在pom.xml中,把xml文件加入编译,成功解决问题。

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

 

其实右键mark directory as ..->sources root 就能解决问题的。

但是,电脑差,或者用太久卡了,idea就会编译不进,只能手动添加,心疼自己的破电脑。

相关文章:

  • 2022-12-23
  • 2021-04-26
  • 2022-12-23
  • 2021-05-10
  • 2021-04-11
  • 2021-12-28
猜你喜欢
  • 2022-12-23
  • 2021-08-27
  • 2021-06-18
  • 2022-01-07
  • 2021-07-17
  • 2021-07-13
相关资源
相似解决方案