zoukankan      html  css  js  c++  java
  • 对于Maven管理的项目制定虚拟目录

    基于Maven管理的web项目结构:

    target目录是用来存放项目打包之后生成的文件的目录,此目录中的文件必须调用mvn clean package后才能生成,

    如果把虚拟目录设置在此目录中,则每次修改项目后都需要调用mvn,很不方便

    正确方法:

      1.设置虚拟目录为:src/main/webapp

      2.在pom.xml中更改maven打包的目录位置

    <!-- 更改maven默认的打包目录 -->
                <plugin>
                   <artifactId>maven-war-plugin</artifactId>
                   <configuration>
                       <webappDirectory>${basedir}/src/main/webapp</webappDirectory>
                       <warSourceDirectory>${basedir}/src/main/webapp</warSourceDirectory>
                   </configuration>
               </plugin>   
  • 相关阅读:
    Fire
    Apple Tree
    访问艺术馆
    三角关系
    字母表
    折纸
    旅行
    单词分类

    圆桌游戏
  • 原文地址:https://www.cnblogs.com/DajiangDev/p/3548467.html
Copyright © 2011-2022 走看看