idea ssm整合 dao层 mapper xml 文件不能映射 问题

原来使用eclipse 是没有问题的

因为刚开始使用idea 不太熟悉,网上废了 半天近才找原因

在pom 文件中加入

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

重新编译 发现在target 目录中出现了xml文件 测试正常使用

参考地址

https://bbs.csdn.net/topics/391841282?page=1#post-402070612

发布了255 篇原创文章 · 获赞 39 · 访问量 35万+

猜你喜欢

转载自blog.csdn.net/kangguang/article/details/103982248