-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
Tighten rules around profile naming #34062
Comments
This is an edge-casey situation and arguably a terrible choice to include a wildcard in your profile name. However, there is no place in the Spring Boot nor Spring Framework docs (that I could find) that guide the user to the rules for a profile name. Maybe just adding a small section to the docs would suffice. |
Another interesting point, there is a validateProfile in |
I think we should tighten the rules for Spring Boot applications. The |
We've had an issue related to |
I started working on this issue and I added the following code in the beginning of
And I also created the following method:
I didn't include
I would like to know if the changes I made solve the issue correctly. If they do, what should I do about the comma problem? P.s.: I also made the unit tests that verify the changes I made. |
Thanks for looking at this @bbulgarelli. Looking at commit 7ab2bca it seems like we added the profile test when fixing #19537. I think we added the comma test for completeness, but I think it's fine to remove it. A better exception would have actually helped the reporter of #19537. Feel free to submit a pull-request if you have something you'd like us to review. |
Superseded by #43176. |
If you set
spring.profiles.active
to a value that contains a*
the app will fail to start.Steps to reproduce
Spring Boot
3.0.2
simplest application from start.spring.io:Start it w/
spring.profiles.active
set tofoo*bar
via any normal means such as:App fails to start and reports the following in the log:
Cause
The
*
qualifies it to be processed as a pattern in StandardConfigDataLocationResolver#resolve(StandardConfigDataReference)The text was updated successfully, but these errors were encountered: