HTTP Status 500 - No bean named
HTTP Status 500 - No bean named 'controller' is defined
type Exception report
message No bean named 'controller' is defined
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'controller' is defined
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:660)
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1157)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:280)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:956)
com.imooc.smm.global.DispatcherServlet.service(DispatcherServlet.java:44)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
com.imooc.smm.global.encodingFilter.doFilter(encodingFilter.java:19)
正在回答 回答被采纳积分+1
你好同学,如下报错提示是在spring容器中找不到名为contrller这个bean对象,建议你在当前项目中有没有名为controller这个bean呢?主要检查代码中的controller是否有@Controller("controller")这个注解呢,祝学习愉快~
- 参与学习 人
- 提交作业 205 份
- 解答问题 4317 个
Java中非常实用的SSM整合开发内容,从Spring开始,到MyBaits的进阶内容,再到SpringMVC的应用,最后是SSM整合开发案例,逐步深入,助你成长为一名Java工程师!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星