Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Skip Jar Scanning for Annotations #199

Open
mr83-uw opened this issue Apr 9, 2021 · 1 comment
Open

Skip Jar Scanning for Annotations #199

mr83-uw opened this issue Apr 9, 2021 · 1 comment

Comments

@mr83-uw
Copy link

mr83-uw commented Apr 9, 2021

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.

@arisjramos
Copy link

arisjramos commented Apr 12, 2022

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>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants