Some times we are going to need running a Spring boot application with its application.properties outside of the jar, sometimes you just move your final .jar to another server, or sometimes, you just need to change your Spring boot application port or database credentials among other settings, so to this without recompiling and packaging everything again we just copy the application.properties at the same level of the .jar file and that's it you can now change your application.properties any time without recompiling everything.
in this case, I have got an end .jar file name Generic-0.0.1-SNAPSHOT.jar, and I copied the application.properties of the project and paste it at the same level where I run
java -jar Generic-0.0.1-SNAPSHOT.jar allowing me to do changes just editing that application.properties.
in this case, I have got an end .jar file name Generic-0.0.1-SNAPSHOT.jar, and I copied the application.properties of the project and paste it at the same level where I run
java -jar Generic-0.0.1-SNAPSHOT.jar allowing me to do changes just editing that application.properties.
Comments
Post a Comment