-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Reference documentation sample for MethodValidationPostProcessor
is missing a static
keyword
#32929
Comments
Have you tried adding |
The warning is as follows:
The documentation is wrong, that Java example should have the static keyword. We'll get that fixed but, as others have said, please read the warning in the log. I don't know how to achieve that with Kotlin though. As for the sample demo, if you're using Spring Boot, you don't need to register that bean as the auto-configuration does that already. |
MethodValidationPostProcessor
triggers Bean *** is not eligible for getting processed by all BeanPostProcessors
warning
I think it would look like this: @Configuration
class AppConfig {
companion object {
@JvmStatic
@Bean
fun validationPostProcessor(): MethodValidationPostProcessor {
return MethodValidationPostProcessor()
}
}
} |
Yes, I am aware how @sdeleuze offered to look why the code above doesn't work. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
I am using Spring boot, and remove this bean can get rid of the warning. However,
To see this, I have commit #3 and in it the |
MethodValidationPostProcessor
is missing a static
keyword
Documentation fixed for the Java use case. Declaring |
I followed the Spring official document to define
MethodValidationPostProcessor
for bean validation. But I am triggering the below warning:To reproduce it, see https://github.com/ozooxo/spring-jakarta-validation-post-processors-warning
MethodValidationPostProcessor
bean following the doc.then if I
./gradlew bootRun
I'll see the above warning.It seems that a similar problem has been coming up before in ~2017:
but it has been coming back.
The text was updated successfully, but these errors were encountered: