ssm 找不到配置文件

項目結構

因爲想把mybatis的mapper文件和dao層放到一塊兒因此在pom中添加了java

因此編譯時會忽略resources文件中的配置文件,因此pom.xml<build>標籤中修改成mybatis

<!--指定mapper存放路徑-->
    <resources>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/*.xml</include>
        </includes>
      </resource>
      <!--指定配置文件存放路徑-->
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*.properties</include>
          <include>**/*.xml</include>
        </includes>
        <filtering>false</filtering>
      </resource>
    </resources>
相關文章
相關標籤/搜索