Disable scanManifest of Jar Scan in tomcat embed in spring boot

后端 未结 3 986
悲哀的现实
悲哀的现实 2021-02-13 20:57

I\'m getting some warnings in log, like this:

java.io.FileNotFoundException: C:\\Users\\user\\.m2\\repository\\com\\lowagie\\itext\\2.0.8\\bcmail-jdk14-138.jar (         


        
3条回答
  •  清酒与你
    2021-02-13 21:08

    Edit: how about this?

      @Bean
      public EmbeddedServletContainerFactory embeddedServletContainerFactory() {
        return new TomcatEmbeddedServletContainerFactory() {
          @Override
          protected void postProcessContext(Context context) {
            ((StandardJarScanner) context.getJarScanner()).setScanManifest(false);
          }
        };
      }
    

提交回复
热议问题