Skip to content

url /{label}/{application}-{profile}.properties stopped working in spring boot 2.6.1 and config 3.1.0 #2020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aizerin opened this issue Dec 23, 2021 · 4 comments · Fixed by #2031
Labels
Milestone

Comments

@aizerin
Copy link

aizerin commented Dec 23, 2021

I upgraded spring cloud to 2021.0.0 and spring boot to 2.6.1 and it stopped working for URL in format /{label}/{application}-{profile}.properties.

It ends with this response:

{"name":"master","profiles":["app-devt.properties"],"label":null,"version":null,"state":null,"propertySources":[]}

I tried to debug it and it goes to this method in the controller instead of the correct one.

https://github.com/spring-cloud/spring-cloud-config/blob/v3.1.0/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/EnvironmentController.java#L109

@ryanjbaxter
Copy link
Contributor

Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.

@hpoettker
Copy link
Contributor

I think the old behavior should return if the property spring.mvc.pathmatch.matching-strategy: ant_path_matcher is set.

@SamuelTissot
Copy link

SamuelTissot commented Jan 21, 2022

I can confirm that spring.mvc.pathmatch.matching-strategy=ant_path_matcher fixed the issue

@ryanjbaxter
Copy link
Contributor

Change in boot spring-projects/spring-boot#24805

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants