警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.handler.MappedInterceptor#0': Cannot create inner bean 'controller.interceptor#0' of type [controller.interceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [controller.interceptor] for bean with name 'controller.interceptor#0' defined in class path resource [mvc.xml]; nested exception is java.lang.ClassNotFoundException: controller.interceptor六月 16, 2018 11:06:57 上午 org.springframework.web.servlet.DispatcherServlet initServletBean严重: Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.handler.MappedInterceptor#0': Cannot create inner bean 'controller.interceptor#0' of type [controller.interceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [controller.interceptor] for bean with name 'controller.interceptor#0' defined in class path resource [mvc.xml]; nested exception is java.lang.ClassNotFoundException: controller.interceptor 不加拦截器配置可以正常显示,不报错,初学spring mvc上网找了好多都无法解决,环境换了好几个版本依然不行,
1 回答
wldraa
TA贡献33条经验 获得超17个赞
nested exception is java.lang.ClassNotFoundException: controller.interceptor
controller.interceptor 没有找到这个类 ,你检查一下是包名没有打全,还是拼错了 (比如 i 是大写的?)
添加回答
举报
0/150
提交
取消