springboot 不加载mybatiesPlus的mapper.xml文件 的解决方法

1:在pom.xml中加入

	
	
		
			
				src/main/java
				
					**/*.xml
				
				false
			
		
	

2:在application.properties中加入

#配置mapper xml文件的路径,这个配置以后 mybaties的xml文件就能被编译加载,还需要在pom.xml中配置,这个项目是父工程service
# 的pom.xml加的配置,,两个配置缺一不可
mybatis-plus.mapper-locations=classpath:com/qiyun/edusevice/mapper/xml/*.xml

 

你可能感兴趣的:(mapper.xml,mybatiesPlus,springboot)