service验证错误
来源:2-9 验证Sevice
慕后端1490440
2019-04-11
Error creating bean with name 'com.liul.o2o.service.AreaServiceTest': Unsatisfied dependency expressed through field 'areaService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.liul.o2o.service.AreaService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
写回答
2回答
-
翔仔
2019-04-11
同学需要看看你的spring-service.xml里面扫的package是否能对上,以及你的BaseTest.java里面是否引入了spring-service.xml
并且我看同学的ut 类的截图,为什么class下面还有那么多注释?我看好像花括号结尾有语法错误,需要同学解决下相关的错误,是不是在类的外面写了啥
10 -
慕后端1490440
提问者
2019-04-11
老师我后来把@service添加了。还是不能创建bean
00
相似问题