2.6.0 update overrides the default behavior for the PropertyPlaceholderHelper
See original GitHub issueThe 2.6.0 update seems to automatically configure a default for the whole application. This code works perfectly fine with 2.5.0 but crashes in 2.6.0 if spring.horse is undefined.
This is caused by a change in SwaggerCommonConfiguration when PropertySourcesPlaceholderConfigurer was replaced with PropertyPlaceholderConfigurer
I think that the new behavior is actually the default that spring boot had, I just wanted to log a side effect that I received by updating the library.
@SpringBootApplication
@RestController
@EnableSwagger2
public class Swagger2SpringBoot {
@Value("${spring.horse}")
private String horse;
public static void main(String[] args) throws Exception {
new SpringApplication(Swagger2SpringBoot.class).run(args);
}
@RequestMapping(value = "/dummy")
String meGet() {
return null;
}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
docs/release-notes.md · serv/springfox - Gitee.com
2.6.0 Release Notes ... infinite loop has-workaround @leelance; (#1508) Update overrides the default behavior for the PropertyPlaceholderHelper @apixandru ...
Read more >Spring boot could not resolve placeholder in string
Right-clicking on the project ->Configure->Convert to Maven Project. Then right-click on the project ->Maven->Update Project solved the issue.
Read more >Core Features - Spring
This search ordering lets you specify default values in one configuration file and then selectively override those values in another. You can provide...
Read more >Index (spring-boot 2.6.5 API) - javadoc.io
Create a new AbstractConfigurableWebServerFactory instance with the specified port. AbstractDataSourceInitializer - Class in org.springframework.boot.jdbc.
Read more >caused by: java.lang.illegalargumentexception: could not ...
未配置信息属性数据信息导致,解决方案:增加配置文件属性值org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Maybe fixed by https://github.com/springfox/springfox/commit/d3c18b9969648958811d3fcdff9b9fd5ff25a2e9 ?
Fixed has been fixed