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
Configuration metadata annotation processor may use the wrong accessor for boolean properties #24002
Comments
Unfortunately, we won't be able to "undo" the deprecation with manual metadata as things stand. Manual metadata is used to override the reason, replacement or level but not the fact the property is deprecated. |
For now I created a workaround where I set the It would be nice to be able to get rid of this workaround at some point, so I would appreciate some kind of fix. But if that can only happen in a next big release of Spring Boot, then so be it. |
This commit makes sure to use the most specific getter if more than one candidate exists. Closes spring-projectsgh-24002
server.tomcat.use-relative-redirects
property incorrectly marked as deprecated
I've repurposed this issue to fix a bug in the annotation processor where it may use the wrong accessor for a boolean type in case of multiple candidates, as in this case. The former |
That is a great solution. Thank you very much. |
Spring Boot version: 2.3.5.RELEASE
The
server.tomcat.use-relative-redirects
property is incorrectly marked as deprecated in thespring-configuration-metadata.json
of thespring-boot-autoconfiguration
moduleThe problem is that the
server.tomcat.use-relative-redirects
is not deprecated, but only theBoolean
typed getter and setter methods of theorg.springframework.boot.autoconfigure.web.ServerProperties.Tomcat#useRelativeRedirects
are deprecated (see the daed512 commit and the #20796 issue for the related changes). The addition of the@Deprecated
to theBoolean getUseRelativeRedirects
caused thedeprecated
to be set on true for theserver.tomcat.use-relative-redirects
entry in thespring-configuration-metadata.json
of thespring-boot-autoconfiguration
module.The incorrect deprecation of this property now causes the properties migration listener to warn about the use of this property:
The Intellij application properties editor now also warns about setting this property.
The text was updated successfully, but these errors were encountered: