-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConverterNotFoundException unable to register converter OffsetDateTime to Date #2327
Comments
When I create my own controller that inserts data into the repository and return the audited result, everything works as it should. |
Seems you're referring to
@odrotbohm any objections to register JSR310 converters in the |
One more thing: The configuration code would be required to look like: @Component
class MyConfigurer implements RepositoryRestConfigurer {
@Override
public void configureConversionService(ConfigurableConversionService conversionService) {
conversionService.addConverter(new OffsetDateTimeConverter());
}
}
static class OffsetDateTimeConverter implements Converter<OffsetDateTime, Date> {
@Override
public Date convert(OffsetDateTime source) {
return Date.from(source.toInstant());
}
} |
I have tried similar if not the same solution, but the result is the same. So it's not possible yet, am I getting that right? |
I think we have to paddle back a bit here. Inclined to move this to Data Commons for investigation. |
Because, I used a custom DateTime provider for auditing.
|
I am not able to register converter for Data REST, according to instructions Custom conversions.
I have tried other methods, but without success.
Entity is created but cannot be displayed via endpoint/{ID}.
Nor other ways to access via ID, but displaying all works.
Am I doing something wrong? Or what's the workaround?
demo.zip
The text was updated successfully, but these errors were encountered: