gradle-tomcat-plugin icon indicating copy to clipboard operation
gradle-tomcat-plugin copied to clipboard

Skip Jar Scanning for Annotations

Open mr83-uw opened this issue 3 years ago • 1 comments

Is there anyway for me to instruct tomcat to skip scanning for annotations in jar files?

My current start-up time is about 1 minute 20 seconds. If I add metadata-complete="true" to my web.xml file, I can reduce the startup time to about 7 seconds, however I lose the ability to use the @WebServlet annontation.

A stand alone tomcat instance take about 7-8 seconds to startup with annontation scanning in my classpath. It is skipping scanning the included jars in my project.

mr83-uw avatar Apr 09 '21 23:04 mr83-uw

Hello,

To avoid this just add an META-INF/context.xml file to your webapp with the fallowing content :

<Context> <JarScanner scanClassPath="false" scanAllFiles="false" scanAllDirectories="false"></JarScanner> </Context>

arisjramos avatar Apr 12 '22 11:04 arisjramos