The slow startup is caused because every single class file in every single JAR file in /WEB-INF/lib
is also scanned for Servlet 3.0 specific annotations. You apparently have a lot of (large) JAR files in /WEB-INF/lib
.
The metadata-complete="true"
indicates that the JAR files in /WEB-INF/lib
doesn't need to be scanned for Servlet 3.0 specific annotations, but the webapp's own classes will still be scanned.
Note that you listed there two JSF annotations and one Java SE annotation, not any Servlet 3.0 annotations. The Servlet 3.0 annotations are listed in the javax.servlet.annotation
package. JSF will only scan for annotations when the JAR file contains a JSF 2.0 compatible /META-INF/faces-config.xml
file. It won't immediately scan every single class in every JAR file. The Java SE @Override
annotation is not a runtime annotation, but a compile-time aid only.
See also:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…