I have some warning messages when I use java 11 instead of java 8 because some of some new dependecies (jaxb, jaxws). The message is :
WARN o.a.t.u.s.StandardJarScanner.log - Failed to scan [...] from classloader hierarchy
For a lot of JAR (some examples: jaxb-api.jar, txw2-2.4.0-b180830.0438.jar, istack-commons-runtime-3.0.7.jar...)
So to solve this I can add to my @Configuration file
@Bean
public TomcatServletWebServerFactory tomcatFactory() {
return new TomcatServletWebServerFactory() {
@Override
protected void postProcessContext(Context context) {
((StandardJarScanner) context.getJarScanner()).setScanManifest(false);
}
};
}
Which skip the JAR scaning for all JAR.
So my question is, what is this JAR scaning and do I need it? Also, I know I can add jar to catalina.properties for tomcat.util.scan.StandardJarScanFilter.jarsToSkip but can I do this in my spring boot app?