1. 增加maven 依赖

 <properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<mockito-all.version>1.10.19</mockito-all.version>
<spring-boot.version>1.5.9.RELEASE</spring-boot.version>
<maven-antrun.version>1.8</maven-antrun.version>
<pandora-boot.version>-release</pandora-boot.version>
<pandora-boot-maven-plugin.version>xxx</pandora-boot-maven-plugin.version>
<autoconfig-maven-plugin.version>1.2-fixcompress-SNAPSHOT</autoconfig-maven-plugin.version>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven-antrun.version}</version>
</plugin>
<plugin>
<groupId>com.taobao.pandora</groupId>
<artifactId>pandora-boot-maven-plugin</artifactId>
<version>${pandora-boot-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>com.alibaba.citrus.tool</groupId>
<artifactId>autoconfig-maven-plugin</artifactId>
<version>${autoconfig-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<build>
<plugins>
<plugin>
<groupId>com.taobao.pandora</groupId>
<artifactId>pandora-boot-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>repackage</goal>
</goals> </execution>
</executions>
</plugin>
<plugin>
<groupId>com.alibaba.citrus.tool</groupId>
<artifactId>autoconfig-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>autoconfig</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 解压fat jar到target/${project-name}目录 -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<configuration>
<tasks>
<unzip
src="${project.build.directory}/${project.build.finalName}.${project.packaging}"
dest="${project.build.directory}/abc" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

auto-config.xml 内容

<?xml version="1.0" encoding="UTF-8"?>
<config>
<group name="default">
<property name="spring.profiles.active" defaultValue="local" description="config env"/>
</group>
<script>
<generate template="application.properties"/>
</script>
</config>

application.properties 内容

project.name=sdfs
spring.profiles.active=${spring.profiles.active}

-Dautoconfig.userProperties=/abc/def/antx.properties

最新文章

  1. jQuery中的$.grep()方法的使用
  2. UVA 820 --- POJ 1273 最大流
  3. Js的引用关系示例和总结
  4. vba 工作案例-sheet间拷贝内容
  5. DevExpress中的ASPxTreeView 递归显示checknodes并获得选中值
  6. Nokia 的 Scrum标准
  7. js和jQuery 获取屏幕高度、宽度
  8. 动态创建MySQL数据库
  9. 数据库(学习整理)----4--Oracle数据查询(基础点1)
  10. DOCKER功能练习
  11. 在Eclipse如何实现在xml文件实现代码提示
  12. 搭建微信小程序的本地测试服务器 json-server
  13. mac下git安装与使用
  14. 骨灰级玩家体验带你测试体验天使纪元OL折扣端
  15. JVM运行时数据区域
  16. Git回滚代码到某个commit
  17. AngularJS中转换响应内容
  18. http_range说明
  19. 【转】IE浏览器CSS BUG集锦
  20. Python学习--Selenium模块

热门文章

  1. hdu 1847 博弈基础题 SG函数 或者规律2种方法
  2. nyist oj 214 单调递增子序列(二) (动态规划经典)
  3. Spring DAO vs Spring ORM vs Spring JDBC
  4. Ext.state.Manager.setProvider(new Ext.state.CookieProvider())
  5. OpenShift上部署Redis主从集群
  6. 硬件负载均衡F5和软负责均衡Nginx
  7. Objective-C:动态绑定
  8. OpenCV学习(35) OpenCV中的PCA算法
  9. 微信小程序Nginx环境配置
  10. Minimum Window Substring leetcode java