2.6.0 : Properties are not read anymore (regression)
See original GitHub issue- What version of the library are you using? 2.6.0
- Bug report.
- if you have a repo that demonstrates the issue for bonus points! https://github.com/cbornet/springfox-demos
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:
- Created 7 years ago
- Comments:18 (12 by maintainers)
Top 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 >
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
@jayanderson Within the next week
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:
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.
Cheers!