I have realized that when I run spring booth application, embedded tomcat files extracted under /tmp
file.
Periodic cleanup removes this folder so application gives an error.
Is there any way to modify the path, changing from /tmp
to /customfolder.
The Spring Boot framework provides the default embedded server (Tomcat) to run the Spring Boot application. It runs on port 8080. It is possible to change the port in Spring Boot.
Another way to change the port of embedded tomcat in the Spring Boot application is by specifying the server. port property in the resource file. For example, if you want your Spring boot application to listen on port 8080, then you can specify server. port=8080 on the application.
properties in default location. Spring Boot loads the application. properties file automatically from the project classpath. All you have to do is to create a new file under the src/main/resources directory.
By default, Spring Boot provides an embedded Apache Tomcat build. By default, Spring Boot configures everything for you in a way that's most natural from development to production in today's platforms, as well as in the leading platforms-as-a-service.
You are looking for the property server.tomcat.basedir
, aren't you?
server.tomcat.basedir= # Tomcat base directory. If not specified
# a temporary directory will be used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With