0

I am looking for xml configuration for exporting IDs. By default spring data rest repositories do not export id attribute.

Only solutions i found are configured via java classes.

Spring boot @ResponseBody doesn't serialize entity id

Basicaly equivalent of config.exposeIdsFor(Entity.class) in xml config.

Community
  • 1
  • 1
Rob
  • 708
  • 8
  • 27
  • Have you tried declaring a bean in your configuration file directly. somethign like this ` ` – Pragnani Oct 17 '16 at 14:55
  • Yes, i already tried ` ` and got `org.springframework.beans.NotWritablePropertyException: Invalid property 'exposeIdsFor' of bean class [org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$594456f2]: Bean property 'exposeIdsFor' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?` – Rob Oct 17 '16 at 15:36
  • `exposeIdsFor` will expect list of classes, so you should supply its value inside as I have mentioned in above comment. Also you should declare bean `RepositoryRestCo‌​nfiguration` not `Repositor‌​yRestMvcConfiguratio‌​n` – Pragnani Oct 18 '16 at 10:18
  • place this as is ` ` – Pragnani Oct 18 '16 at 10:20

0 Answers0