Reputation: 191
I want to speed up Tomcat startup skipping scanning jars, but there are lots of jars, that I can't figure one by one, so I want to skip all jars, but I am not sure what will happen, is a classNotFound exception, or a much more slow start-up?
I add configuration as below into catalina.properties, and my project still speed up by 10 seconds without error. So I want to know why it didn't throw a ClassNotFound exception. ```
tomcat.util.scan.DefaultJarScanner.jarsToSkip=*.jar
org.apache.catalina.startup.ContextConfig.jarsToSkip=*.jar
org.apache.catalina.startup.TldConfig.jarsToSkip=*.jar
```
Upvotes: 0
Views: 1881
Reputation: 201487
You are skipping services that tomcat can provide, not loading of the classes (which is handled by the classloader). These services look for configuration, annotations (and/or other metadata), to configure context and (from TldConfig
) Startup event listener for a Context that configures application listeners configured in any TLD files.
Upvotes: 1