Reputation: 764
When developing a spring based web app (and deploying to tomcat), we can put our configuration in several places. One of them is catalina.properties. I would like to know how catalina.properties file is made available to spring app. Is it tomcat who does this or spring who loads catalina.properties file? How spring knows from where to load configurations.
Upvotes: 1
Views: 354
Reputation: 116091
Tomcat automatically makes any properties configured in catalina.properties
available as system properties. Spring's Environment
uses a number of different sources for the properties that it contains. One of those sources is the JVM's system properties. As a result, the properties specified in catalina.properties
are available via Spring's Environment
.
Upvotes: 3