项目编译

1:默认情况下,maven 工具它针对我们的java目录下的非java 文件不会执行编译操作、所以在 target 目录下编译后的文件就会丢失了 xml 文件。为了防止出现编译后xml 文件丢失的情况,

  步骤一:在pom.xml 当中配置一个build节点下的 <resource>结点。

 1         <!-- 项目打包时会将java目录中的*.xml文件也进行打包 -->
 2         <resources>
 3             <resource>
 4                 <directory>src/main/java</directory>
 5                 <includes>
 6                     <include>**/*.xml</include>
 7                 </includes>
 8                 <filtering>false</filtering>
 9             </resource>
10         </resources>
View Code

  步骤二:在application.yml中配置 mybatis-plus

1 mybatis-plus:
2   configuration:
3     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
4   mapper-locations: classpath:com/xxx/xxxxx/mapper/xml/*.xml
View Code

 

idea 如何编译项目: 点击maven 中的clean。然后点击 Build project

 

posted on 2021-12-21 23:11  夜空中闪闪发光的星星  阅读(55)  评论(0)    收藏  举报