-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Unable to change spring run profile - always it starts with dev,swagger when on Maven #6947
Comments
Please add your .yo-rc.json here, this is part of our guidelines. And you don't get to choose that your browser/OS info is not related (you can use the I have also noticed this problem a few days ago, and I was going to fix it. Actually it only happens for apps that use spring cloud config and |
It looks like this only occurs for microservices -> in that case, it would be good to change the title, to provide more information |
for anyone still get this error in spring boot 1.5.7, let comment out all code in config/bootstrap.yml. after that: |
Overview of the issue
I've already wrote what's problem here: 995bf17#commitcomment-26665675
Looks like from v4.12.0 and newer applications may be affected with stuck-spring-profile-selection which always runs app on
dev,swagger
(default) profiles.It's impossible to run app in other profile with
mvnw
command.Motivation for or Use Case
Can't run app in other profile using maven :).
Reproduce the error
Use
.yo-rc.json
in linked commit above to regenerate application and try to start it withmvnw -Pprod
command. App will start indev,swagger
profile which is wrong behavior.Related issues
Not founded anything fresh related to that.
Suggest a Fix
Suggestion is proposed in linked above commit.
However whole configuration should be based on spring maven plugin - https://docs.spring.io/spring-boot/docs/current/maven-plugin/examples/run-profiles.html
JHipster Version(s)
v4.13.1 and v4.13.2 is affected.
Probably v4.12.0 and newer too (not tested).
JHipster configuration
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryNot needed.
Browsers and Operating System
Not related (really not related! @PierreBesson below) .
The text was updated successfully, but these errors were encountered: