Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Boot tomcat basedir completely empty

In my application.yml I set

server:
  tomcat:
    basedir: /home/user/TOMCAT

when I run the application with mvn spring-boot:run I see that the folder is created and it has this structure

/TOMCAT/work/Tomcat/localhost/ROOT

and it is completely empty.

I was expecting to find here a webapps folder and so on. It may sound stupid but, where are all tomcat-related files?

like image 471
Manza Avatar asked Feb 05 '26 17:02

Manza


1 Answers

Your tomcat related files are in you spring-boot jar. The directory from which that jar is executed is treated as "catalina.home", while the "basedir" is treated as "catalina.base". The basedir may contain any type of "work" that your application will do that might require writing to disk, such as buffering large files or acting as the relative location for local application logs.

like image 95
Pytry Avatar answered Feb 12 '26 23:02

Pytry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!