I\'m trying to setup the Spring Data/JPA DomainClassConverter to automatically convert (String) id\'s to the domain classes itself.
My project is uses Java Config (so no
DomainClassConverter
should be declared as a bean (because it's ApplicationContextAware
), and it registers itself in ConversionService
automatically, so that you don't need to register it manually:
@Bean @Autowired
public DomainClassConverter domainClassConverter(ConversionService cs) {
return new DomainClassConverter(cs);
}