我的具体报错日志是   Error parsing SQL Mapper Configuration. Cause: java.io.IOException  Could not find resource com  dev-mapper.xml 。。。意识是找不到

我用maven管理,在target文件夹下并没有将dev-mapper.xml ,出错原因就是maven编译时没有将xml文件放进去,所以才会找不到  dev-mapper.xml文件

              解决办法:在pom.xml中添加以下代码: 问题解决。

    如果在pom.xml中已有<build>标签,直接将<recources>标签中的内容复制进入,如果没有,就将下方的代码全部复制,说这么清楚是因为有些初学者确实没那么容易理解。希望对大家

有所帮助。

 <build>
	<resources>
			<resource>
				<directory>src/main/java</directory>
				<includes>
					<include>**/*.xml</include>
				</includes>
				<filtering>true</filtering>
			</resource>
		</resources>

  </build>

   

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2021-07-29
  • 2021-08-16
猜你喜欢
  • 2022-12-23
  • 2021-12-17
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
相关资源
相似解决方案