Warning: file_put_contents(/datas/wwwroot/jiajiahui/core/caches/caches_template/2/default/show.php): failed to open stream: Permission denied in /datas/wwwroot/jiajiahui/core/libraries/classes/template_cache.class.php on line 55

Warning: chmod(): Operation not permitted in /datas/wwwroot/jiajiahui/core/libraries/classes/template_cache.class.php on line 56
如何打包操作和设置Java Maven的资源文件配置 - 源码之家

如何打包操作和设置Java Maven的资源文件配置

今天就跟大家聊聊有关如何打包操作和设置Java Maven的资源文件配置,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。

如何打包操作和设置Java Maven的资源文件配置

如何打包操作和设置Java Maven的资源文件配置

如何打包操作和设置Java Maven的资源文件配置

如何打包操作和设置Java Maven的资源文件配置

如何打包操作和设置Java Maven的资源文件配置

如何打包操作和设置Java Maven的资源文件配置

  <profiles>
    <profile>
      <id>dev</id>
      <properties>
              <env>dev</env>
      </properties>
      <!--未指定环境时,默认打包dev环境-->
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
    </profile>
    <profile>
      <id>test</id>
      <properties>
        <env>test</env>
      </properties>
    </profile>
    <profile>
      <id>product</id>
      <properties>
        <env>product</env>
      </properties>
    </profile>
  </profiles>

如何打包操作和设置Java Maven的资源文件配置

<!--对于项目资源文件的配置放在build中-->
    <resources>
      <resource>
        <directory>src/main/resources/${env}</directory>
      </resource>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/*.xml</include>
          <include>**/*.properties</include>
          <include>**/*.tld</include>
        </includes>
        <filtering>false</filtering>
      </resource>
    </resources>

如何打包操作和设置Java Maven的资源文件配置

看完上述内容,你们对如何打包操作和设置Java Maven的资源文件配置有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注行业资讯频道,感谢大家的支持。