We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Custom formatters are not available: See
https://github.com/rburgst/micronaut-spring-example
The gist ist that you would define custom type converters for REST controller methods via the FormatterRegistry
@Configuration public class WebConfig implements WebMvcConfigurer { @Override public void addFormatters(FormatterRegistry registry) { registry.addFormatterForFieldType(TenantId.class, new GenericIdFormatter(TenantId.class)); } }
These are not used/initialized by micronaut-spring, therefore the following request fails:
$ http ":8080/greet?tenantId=7364b7d8-490d-49b9-8e18-7b96f41734e8" HTTP/1.1 400 Bad Request Date: Sun, 2 Dec 2018 09:16:43 GMT connection: close content-length: 184 content-type: application/json { "_links": { "self": { "href": "/greet?tenantId=7364b7d8-490d-49b9-8e18-7b96f41734e8", "templated": false } }, "message": "Required argument [TenantId tenantId] not specified", "path": "/tenantId" }
To replicate the problem, launch the application via
./gradlew bootRun
and send the above mentioned request.
The text was updated successfully, but these errors were encountered:
I guess we could probably adapt formatters to the binder API, will see what we can do. Thanks for the feedback
Sorry, something went wrong.
No branches or pull requests
Custom formatters are not available: See
https://github.com/rburgst/micronaut-spring-example
The gist ist that you would define custom type converters for REST controller methods via the FormatterRegistry
These are not used/initialized by micronaut-spring, therefore the following request fails:
To replicate the problem, launch the application via
and send the above mentioned request.
The text was updated successfully, but these errors were encountered: