问题解决:java.io.IOException: java.lang.reflect.InvocationTargetException,serializer.jar等包找不到
两种解决办法:
第一种是在启动类家方法:
@Bean public TomcatServletWebServerFactory tomcatFactory(){ return new TomcatServletWebServerFactory(){ @Override protected void postProcessContext(Context context) { ((StandardJarScanner) context.getJarScanner()).setScanManifest(false); } }; }
第二种方法是排除相关依赖:
<!--编译JSP,包含了tomcat-embed-core,tomcat-embed-el --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </dependency> <!--用于编译jsp --> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> </dependency> <!--如果使用了JSTL标签库则需要添加如下依赖 --> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> </dependency>
参考博客:https://blog.csdn.net/wfanking/article/details/98204730