0

I have a spring boot war (REST service) file that is run on a tomcat 8 server. I am using spring-boot-maven-plugin to get all the loader goodies in the repackaged war. Due to recent company policy changes, we can no longer have dependency jars packaged inside a war. Spring boot maven plugin adds the loaders to the war and also adds a lib or lib-provided directory inside WEB-INF. If I were to manually delete the lib directory and then use Tomcat 8's JarResources to mount a server directory to WEB-INF/lib. Will the spring boot war run as usual?

1 Answers1

0
  1. Remove the lib contents from the spring boot war by using something like
    zip -d abc.war "WEB-INF/lib"
    zip -d abc.war "WEB-INF/lib-provided"
    
  2. In the tomcat, conf/context.xml, add the JarResources XML element and define the path where the libs can be found and in webAppMount, mention "WEB-INF/lib".
Dharman
  • 30,962
  • 25
  • 85
  • 135