0

This is an extension to this question: How change property values at runtime in Spring

I don't want to restart my app if I change some properties in a property file, how can I achieve this.

Example:

Let's say I have 2 profiles: dev, and prod

application-dev.properties

shouldSendFailureEmail = false

application-prod.properties

shouldSendFailureEmail = true 

For debugging purpose I want to enable email to be sent in dev environment as well, even if I change the property file the changes are not getting reflected unless I restart the app.

Running Springboot application using this command :

 java 
      -Dspring.config.location=/ngs/app/seat/config/ 
      -Dspring.config.name=neerajportal -Dspring.profiles.active=qa 
      -Djava.util.concurrent.ForkJoinPool.common.parallelism=40 
      -jar /ngs/app/java-apps/NeerajPortal.war
Neeraj Jain
  • 7,643
  • 6
  • 34
  • 62

0 Answers0