tomcat启动时在
org.apache.jasper.servlet.TldScanner scanJars
位置启动特别慢,详细日志:
INFO: Initialization processed in 1427 ms
十二月 14, 2020 4:35:29 下午 org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Catalina]
十二月 14, 2020 4:35:29 下午 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.5.41
十二月 14, 2020 4:35:37 下午 org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
十二月 14, 2020 4:36:01 下午 org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
16:36:01,419 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
原因是tomcat启动时会扫描大量jar包,如果含有不符合TLD规范的就会出现这个问题
解决办法:
修改tomcat下catalina.properties文件
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
为
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar
来源:oschina
链接:https://my.oschina.net/GeminiLiu/blog/4805559