刚刚还启动正常的项目,重启的时候突然报错;瞬间蒙了;怎么回事?
报错如下:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'methodValidationPostProcessor' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Unsatisfied dependency expressed through method 'methodValidationPostProcessor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroFilter' defined in class path resource [com/jeesite/modules/config/ShiroConfig.class]: Unsatisfied dependency expressed through method 'shiroFilter' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityManager' defined in class path resource [com/jeesite/modules/config/ShiroConfig.class]: Unsatisfied dependency expressed through method 'securityManager' parameter 3; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroCacheManager' defined in class path resource [com/jeesite/autoconfigure/core/CacheAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.jeesite.common.shiro.d.l]: Factory method 'shiroCacheManager' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/io/Charsets
原因: org/apache/commons/io/Charsets 找不到这个类
解决办法:
pom 中加上就好了
<dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.4</version> </dependency>