为了账号安全,请及时绑定邮箱和手机立即绑定

mvc一加拦截器的配置就报错

mvc一加拦截器的配置就报错

慕粉1145407289 2018-06-16 11:12:34
警告: 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 是大写的?)

查看完整回答
反对 回复 2018-06-16
  • 1 回答
  • 0 关注
  • 1275 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信