这个问题整整折腾了我两天,现在记录下来,希望可以帮助和我一样,遇到相同问题的小伙伴. 项目是分层的(Intellij IDEA中的模块Module),有API(Core)层,Service&Dao,Common,Model,上一张项目结构图.(不要在意为什么Service和Dao放在一起.这不是重点.) API中包括了Controller,Mongodb在Service&Dao层中,也就是API层,调用Service&Dao层,我敢用性命担保,所有注释,逻辑,都没有错,但是运行Sp…
我也是最近开始学习Spring Boot,在执行异步操作的时候总是汇报如下的错误: Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.self.spring.springboot.Jeep' available at org.springframework.beans.factory.sup…
先贴上错误 2018-8-16 23:41:10 org.springframework.context.support.ClassPathXmlApplicationContext prepareRefresh信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@5492bbba: startup date [Thu Aug 16 23:41:10 CST 2018]; root of…
话不多说先上图,这是启动类的配置,这里配置了@ComponentScan("我的mapper的接口") 接下来是我的项目结构截图 然后是service 的截图,我在这里加了注解@Service 最后我在测试类里面 的截图 最后附上我的maven的pom 我开始怀疑是这个配置的有问题了 <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.a…
You should autowire interface AbstractManager instead of class MailManager. If you have different implemetations of AbstractManager you can write @Component("mailService") and then @Autowired @Qualifier("mailService") combination to au…
1.错误描写叙述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } 2014-7-13 18:02:58 org.apache.catalina.core.AprLifecycleListener init 信息: Loaded APR based Apache Tomcat Native library 1.1.29 usi…
今天遇到了一个奇怪的问题   在没添加事务之前  所有的代码都是好的 , 当我添加了事务之后, 代码报错 org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type available ApplicationContext: <!-- 配置事务 --> <bean id="transactionManager" class="org.s…
项目使用spring, mybatis.因为分了多个模块,所以会这个模块引用了其它模块的现在,结果使用Junit测试的时候发现有两个模块不能自动注入dao和service问题.解决后在此记录一下. 解决思路,一直以为是dao的xml文件的配置问题,通过日志查看,发现所有的dao与mapper.xml的文件都加载进来了.想着可能是maven包的问题,通过与可测试模块的pom文件对比,解决了这个bug. 异常主要信息: java.lang.IllegalStateException: Failed…
今天在学习spring 框架的时候看着,很简单.但是在真正开始做的时候发现,异常一个接着一个,整的肚子都被搞大了. Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'people5' is defined at org.springframework.beans.factory.support.DefaultListable…
在Spring配置文件中加入了支持注解,即<mvc:annotation-driven/> 重新启动服务器包 org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cacheManager' is defined错误 错误原因:命名空间选择的是xmlns:mvc="http://www.springframework.org/schema/cache" 解决方法:换一种…