spring.profiles.active as command line options not work when run cas-management via `java -jar target/cas-management.war --spring.profiles.active=default`

357 views
Skip to first unread message

Donghua Liu

unread,
Apr 9, 2018, 2:06:33 AM4/9/18
to CAS Community
hi,

I clone the cas-management-overlay project and want to modify some configuration like disable ssl settings. After read the docs on boot-features-external-config-profile-specific-properties , I created a file named application.default.properties based on application.properties, and changed some settings and then run mvn clean package to repackage the war file. Finally, I run the cas-management project via java -jar target/cas-management.war --spring.profiles.active=default or java -Dspring.profiles.active=default -jar target/cas-management.war, but it didn't work as expected. The settings in application.default.properties was not applied. However I could see the console log which shown that it was already using the default profile.


Donghua Liu

unread,
Apr 9, 2018, 2:08:49 AM4/9/18
to CAS Community
If I modified the configurations in application.properties directly, it worked as expected

在 2018年4月9日星期一 UTC+8下午2:06:33,Donghua Liu写道:
Reply all
Reply to author
Forward
0 new messages