How to load ehCache.xml from external location in Spring Boot?

Out of the box the EhCache is looking for the ehCache.xml configuration file in resources path which is albo packed into jar file. In case when you want to use external ehCache.xml configuration file to can use the VM options and pass there appropriate value.

The most important part is the “file:” prefix before the path. Without it the application will looking for the configuration file in the classpath.


For example:

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments