After migrating from Boot 2.2.x to 2.4.5 some @RequestMapping("${api.path}") (api.path configured in application.properties) have started failing because the evaluator does not expand the property and tries to extract {api.path} as a url path, failing because a dot is an illegal char for a java variable.
Might this be a bug on latest changes or maybe a missing configuration that is required now?
Comment From: scottfrederick
@nightswimmings Thanks for the report. Unfortunately I can't reproduce the issue with the information you've provided. Please provide a minimal sample application that reproduces the problem so we can take another look. You can give a link to a project on GitHub or attach a zip to the issue.
Comment From: nightswimmings
Solved, we are required to move to #{'${api.path}'}
syntax. The default configured RequestMappingHandlerMapping's EmbeddedValueResolver seems to require SpEL expression because it is autoconfigured with StandardBeanExpressionResolver, which uses#{
as prefix , but somehow so far it supported direct property expressions on the fly in our project. We did not change anything but migration to latest Spring Boot. We don't have the time to invest on something that we can make work, but just FYI, there is a big chance that something hidden is changing this behaviour, and if so, at least, someone can find the workaround that worked for us here FWIW
Comment From: wilkinsona
Thanks for following up, @nightswimmings.