I am using Grails 3.3.1 with spring boot. the build tool is gradle. All application related properties are configured in application.yml file.
Now I want to access different .yml files for different environments [development, test etc]. For this I have created different .yml files per environment. The command used to run server is : grails -Dgrails.env=test run-app Now when i access any property, it gives me the values from application-test.yml file which is as expected.
But when I access server.port, it is reading this property from application.yml instead of application-test.yml.
Can anyone help me in running the application by using server.port from application-test.yml file
The application.yml is as follows:
server: port: 8081
contextPath : /ssp
the application-test.yml is as follows:
server: port: 8443
contextPath : /ssp
I am expecting the server to run on port 8443 as this property is in application-test.yml. But the server runs on port 8081 as mentioned in application.yml