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 : Properties are not read anymore (regression)

See original GitHub issue

Values from property file are not read when including @EnableSwagger2 I’ve added a /test endpoint in this commit to show the issue

curl "http://localhost:8081/springfox/test"
8080

Response should be 8081.

Downgrading to 2.5.0 solves the issue.

Probably linked to https://github.com/springfox/springfox/commit/e545b61e46513c131a009bf82ab2879ca4cc58d0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
dilipkrishcommented, Oct 21, 2016

@jayanderson Within the next week

1reaction
Verdosocommented, Feb 8, 2017

Ok, Good news. I traced down our issue and it seems that the current behaviour is fine, whereas up to version 2.5.0 Swagger was masking some errors we had in our code. We had some properties defined as such:

@Value("${defaults.whatever}")
private String defaultWhatever;

This placeholder has no default value, so it means the property is mandatory. Up to 2.5.0, I’m presuming Swagger was doing something and providing a default value for those properties. Using 2.6.X, Swagger does not provide a default value and SpringBoot complains, rightly so, that it cannot resolve ${defaults.whatever}.

So, in this case, it was a misconfiguration in our side that had been masked. Once we specified that the properties are optional with the colon at the end, everything worked.

@Value("${defaults.whatever:}")

Cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Profiles set with @ActiveProfiles are not visible to ... - GitHub
After upgrading 2.5.6 to 2.5.7 profiles set with @ActiveProfiles annotation on the test class are not visible to EnvironmentPostProcessor ...
Read more >
Log4j – Changes - Apache Logging Services
Fix resolution of properties not starting with `log4j2. ... JndiManager reverts to 2.17.0 behavior: Read the system property for each call.
Read more >
Lifecycle - Android Developers
Lifecycle-aware components perform actions in response to a change in the lifecycle status of another component, such as activities and fragments.
Read more >
Docker Compose release notes
Fixed a bug where the host value output by docker-machine config default would not be recognized as valid options by the docker-compose command...
Read more >
Zephyr 2.6.0
GitHub #35955 - Bluetooth: Controller: Regression in connection setup. GitHub #35949 - can: mcan: sjw-data devicetree configuration is not ...
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