MyBatis 配置修改升级

img


报错好像变了, 然后 User是红的 不知道为什么

img

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.BOMB.communityTwo.dao.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.context.annotation.Lazy(true)}
麻烦了

那就把你User的包补上看看 ,比如什么 comxx.entity.User

img

如果你没配置前缀,包名就得写完整

parameterType表示参数类型,如果是一个对象,那么就写对象在包的里的路径:com.BOMB.communityTwo.entity.User