代码改变世界

java问题

2022-08-29 10:53  ly772186472  阅读(34)  评论(0)    收藏  举报

Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.ly.mybaitsplus.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

问题原因:没有@mapper注解 在UserMapper类

问题二: mybaits-plus分页不起作用

 

 

@configuration 注解大家已经非常熟悉了,配合@bean注解就可以轻松减少xml配置,这里不再过多介绍;
@Configurable 平时用的却较少,它用于解决非Spring容器管理的Bean中却依赖Spring Bean的场景,也就是说Bean A依赖了一个Spring的Bean B,但是A不是Spring 得Bean所以无法进行属性注入拿不到B的情况。

 问题: 

Parsing error was found in mapping #{__frch_item_0,value}.  Check syntax #{property|(expression), var1=value1, var2=value2, ...}