亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

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 關注
  • 1400 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號