SecondHandHouseIssue
项目问题统计
关于bean无法注入
错误代码
1 | Error creating bean with name 'roleServiceImpl' defined in file [/Users/tai_master/IdeaProjects/SecondHandHouse/web-admin/target/classes/com/qiushui/service/imp/RoleServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.qiushui.dao.RoleDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} |
如何解决: spring-mapper导入扫描约束出错,重新修改约束
1 | javax.servlet.ServletException: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.qiushui.dao.RoleDao.findAll at org.eclipse.jetty.server.handler.HandlerCollection.handle (HandlerCollection.java:146) at org.eclipse.jetty.server.handler.HandlerWrapper.handle (HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle (Server.java:502) at org.eclipse.jetty.server.HttpChannel.handle (HttpChannel.java:370) at org.eclipse.jetty.server.HttpConnection.onFillable (HttpConnection.java:267) |
解决问题:写错了方法
1 | 2024-03-13 23:22:16.955 [qtp223783590-26] DEBUG org.springframework.web.servlet.DispatcherServlet - GET "/role", parameters={} 2024-03-13 23:22:16.956 [qtp223783590-26] DEBUG o.s.web.servlet.handler.SimpleUrlHandlerMapping - Mapped to org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler@690c719a 2024-03-13 23:22:16.958 [qtp223783590-26] DEBUG org.springframework.web.servlet.DispatcherServlet - Completed 404 NOT_FOUND |
解决办法: 页面requestMapping写错
- Post title:SecondHandHouseIssue
- Post author:秋水
- Create time:2024-03-13 23:28:58
- Post link:tai769.github.io2024/03/13/SecondHandHouseIssue/
- Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.