question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

2.6.0 update overrides the default behavior for the PropertyPlaceholderHelper

See original GitHub issue

The 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:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

0reactions
dilipkrishcommented, Oct 26, 2016

Fixed has been fixed

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found