SpringBoot集成Mybatis 找不到Mapper里的接口
SpringBoot集成Mybatis找不到Mapper里的接口,在主类中已经注解了@MapperScan("xxxx"),也在Mapper里注解了@Mapper可是仍然...
SpringBoot集成Mybatis 找不到Mapper里的接口,在主类中已经注解了@MapperScan("xxxx"),也在Mapper里注解了@Mapper 可是仍然报错
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxx.xxxx.dao.TestMapper.count.
很无奈,希望高手帮忙解决 展开
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxx.xxxx.dao.TestMapper.count.
很无奈,希望高手帮忙解决 展开
1个回答
展开全部
mybatis 的springboot 集成项目已经发布了
maven
12345<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.0.0</version></dependency>
properties 配置
123456mybatis.config= # mybatis config filemybatis.mapperLocations= # mappers filemybatis.typeAliasesPackage= # domain object's package mybatis.typeHandlersPackage= # handler's packagemybatis.check-config-location= # check the mybatis configuration existsmybatis.executorType= # mode of execution. Default is SIMPLE
maven
12345<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.0.0</version></dependency>
properties 配置
123456mybatis.config= # mybatis config filemybatis.mapperLocations= # mappers filemybatis.typeAliasesPackage= # domain object's package mybatis.typeHandlersPackage= # handler's packagemybatis.check-config-location= # check the mybatis configuration existsmybatis.executorType= # mode of execution. Default is SIMPLE
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询