Another Grails 7 question. Seemed it will not corr...
# questions
g
Another Grails 7 question. Seemed it will not correctly pick the application.yml if I do (java 24, grails 7.0.0-RC1)
Copy code
gradle bootRun
However, if I do
Copy code
gradle run
application.yml will be correctly picked. ?
j
I have not run into this issue. Did you start with an app generated from start.grails.org or an existing app you upgraded?
g
I am updating an existing app. Then it very likely my environment issue. Let me check this out then. Sorry for the false alarm.
@James Fredley Could this only be springsecurity.7.0.0-M5? I regenerated a fresh app from Grails forge, All my other settings are picked(say, dataSource), but not the springsecurity attributes. Attached a screenshot
@James Fredley sorry, confirmed, it is my local setting issues. Sorry for the miss leading report
❤️ 2
b
@gaolei What was the local setting that caused the issue? I am upgrading an app from 6 my configurations don't seem to get picked up either. 😞
g
There are several, I still could not get them fully sorted out yet. 1. If there is your own plugin, and if they contain application.yml, put the least default configurations there. 2. I tried to use environments settings. For an example, I use spring-security, then I tried to remove my common settings, and set them differently in different environments. Otherwise seemed the spring-security settings can not be picked up. 3. Specify the configurations with Java options. -Dspring.config.location=‘full folder of my_own_applicatioin.yml’ but by now, there are still issues. 1. One of my projects can not resolve the views, both GSP views and GSON views, when running as a Jar. java -jar xxxx.war 2. Some of my projects still can not run with gradle bootRun, but they can run with gradle run At this point, all my apps are development-ready for grails 7, but not production-ready, yet. Will need to continue to work on them
The way I am doing this right now is to create a brand new Grails 7 application and slowly add my projects dependencies into it. Then eventually I can figure out which plugin/dependencies introduced the issues.