It looks like that when I use @EnableSpringDataWebSupport in my project. it will be error looks like this
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue Jun 30 20:52:10 CST 2020
There was an unexpected error (type=Internal Server Error, status=500).
the DomainClassConverter in 2.2.7 is like this
public void setApplicationContext(ApplicationContext context) {
this.repositories = new Repositories(context);
this.toEntityConverter = Optional.of(new ToEntityConverter(this.repositories, this.conversionService));
this.toEntityConverter.ifPresent(it -> this.conversionService.addConverter(it));
this.toIdConverter = Optional.of(new ToIdConverter());
this.toIdConverter.ifPresent(it -> this.conversionService.addConverter(it));
}
but in 2.2.8 or later is like this
public void setApplicationContext(ApplicationContext context) {
this.repositories = Lazy.of(() -> {
Repositories repositories = new Repositories(context);
this.toEntityConverter = Optional.of(new ToEntityConverter(repositories, conversionService));
this.toEntityConverter.ifPresent(it -> conversionService.addConverter(it));
this.toIdConverter = Optional.of(new ToIdConverter(repositories, conversionService));
this.toIdConverter.ifPresent(it -> conversionService.addConverter(it));
return repositories;
});
}
it can not work.
If it is lazy, the repositories can not be registry to the context.
Comment From: wilkinsona
Thanks for the report. DomainClassConverter
is part of Spring Data Commons which is managed as a separate project. They use JIRA for issue tracking. Please open an issue over there with a minimal sample that reproduces the problem that you are experiencing.