No qualifying bean of type ‘com.tengyun.itinerary.mapper.ClasMapper’ available: expected at least 1 bean which qualifies as autow
没有合格的bean可用,没有扫描到mapper,需要在启动类中加入,@MapperScan(" com.test.test1.mapper ")
Invalid bound statement (not found): com.tengyun.itinerary.service.ClasService.pageClas
绑定语句无效,没有加载到mapper.xml文件,如果你的mapper.xml放在Java类文件夹中,需要在pom.xml中配置,放在dependencies标签外
<!-- 项目打包时会将java目录中的*.xml文件也进行打包,**多级目录 -->
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
在application.properties配置文件中,配置
#配置mapper xml文件的路径
mybatis-plus.mapper-locations=classpath:com/lsl/eduservice/mapper/xml/*.xml
yml格式
mybatis-puls:
mapper-locations: classpath:/com/tengyun/itinerary/mapper/xml/*.xml
不要把路径写错了