Invalid bound statement (not found): com.xxx.xxx.mapper.xxx

开发工具:IDEA

问题现象:访问接口时Dao调用报错找不到mapper

mapper和entity是逆向工程生成的  访问报这个错误。

 Invalid bound statement (not found): com.xxx.repository.mapper.SchoolInfoMapper.countByExample

解决方法:

<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
			<resource>
				<directory>src/main/java</directory>
				<filtering>false</filtering>
				<includes>
					<include>**/mapping/*.xml</include>
				</includes>
			</resource>
		</resources>
	</build>

配置你的mapping的路径

问题解决

问题还有可能是其他原因造成的可以参考

https://blog.csdn.net/weixin_42204641/article/details/81155726

猜你喜欢

转载自blog.csdn.net/weixin_42403773/article/details/85680118