SpringBoot 发布到Tomcat运行报错原因之一 SpringBoot发布到独立的tomcat中运行: https://blog.csdn.net/qq_28988969/article/details/78135768

IntelliJ IDEA搭建SpringBoot应用: https://www.cnblogs.com/winner-0715/p/6666302.html

SpringBoot发布到独立的tomcat中运行: https://blog.csdn.net/qq_28988969/article/details/78135768

1、当版本号为:
1.5.6.RELEASE

可以以在Tomcat7中运行


2、当版本号为:

2.0.3.RELEASE

在Tomcat8中运行正常

在Tomcat7中会报异常:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultValidator' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.validation.beanvalidation.LocalValidatorFactoryBean]: Factory method 'defaultValidator' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/el/ELManager


原因: tomcat7中的el-api,版本太低


猜你喜欢

转载自blog.csdn.net/sinat_35605242/article/details/80843050
今日推荐