Description
Martin Hjalmarsson opened DATACMNS-1759 and commented
Version 2.3.1 of DomainClassConverter introduced lazy initialization of Repositories in setApplicationContext(context):
this.repositories = Lazy.of(() -> {
Repositories repositories = new Repositories(context);
[...]
return repositories;
});
The problem with this is that SpringDataWebConfiguration (@EnableSpringDataWebSupport
) creates an instance of DomainClassConverter but then never registers it anywhere so the instance is discarded(?).
DomainClassConverter<FormattingConversionService> converter = new DomainClassConverter<>(conversionService);
converter.setApplicationContext(context);
Before the change was introduced the DomainClassConverter would register Id- and Type-converters immediately in the setApplicationContext method.
Either SpringDataWebConfiguration needs to register the DomainClassConverter in the ConversionService, i.e. conversionService.registerConverter(converter);
Or DomainClassConverter should do that it self in the setApplicationContext method
Affects: 2.3.1 (Neumann SR1)
3 votes, 3 watchers