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

使用autoconfig的更多相关文章

  1. mvn filter autoconfig 产生自动配置

    可以使用filter, 也可以使用autoconfig 详细请见 http://www.openwebx.org/docs/autoconfig.html

  2. maven auto-config 多环境自动打包

    摘自:http://doc.okbase.net/bjhecwq/archive/118121.html maven有许多优秀的插件,最近在研究打包中替换多重环境的配置,同事介绍使用阿里的auto-c ...

  3. Maven插件实现的autoconfig机制(转)

    autoconfig这种机制在软件开发和发布的过程中是非常方便也是非常必要的一种动态替换配置信息的一种手段,一种很贴切的比喻:这个就像在windows下面安装一个软件时,我们按照安装向导给我们弹出提示 ...

  4. Lenovo E46A-Win 7_无线灯亮但无法启动(耽误3天以上您信吗.....)问题: wlan autoconfig 依赖服务或组无法启动

    Lenovo E46A-Win 7_无线灯亮但无法启动(耽误3天以上您信吗.....)问题: wlan autoconfig 依赖服务或组无法启动 提示: windows7 无线连接服务wlan au ...

  5. autoconfig操作小结

    1.添加maven配置在pom文件中 <profile>     <id>prod</id>     <properties>         < ...

  6. spring auto-config

    spring security auto-config auto-config配置 <http auto-config="true"> </http> 自动 ...

  7. alibaba druid 在springboot start autoconfig 下的bug

    alibaba druid 在springboot start autoconfig下的bug 标签(空格分隔):druid springboot start autoconfig 背景 发现.分析过 ...

  8. 在R12下加载Java Bean,配置FORMS_WEB_CONFIG_FILE文件/通过AutoConfig实现Form Server配置文件的修改

    1.定位模版文件$AD_TOP/bin/adtmplreport.sh contextfile=$CONTEXT_FILE target=$FORMS_WEB_CONFIG_FILE以上命令,通过查看 ...

  9. Spring boot 继承 阿里 autoconfig 配置环境参数

    前提:基于springboot 项目 1. 配置pom.xml 文件 <plugin> <groupId>com.alibaba.citrus.tool</groupId ...

  10. AutoConfig工具使用

    下载安装Auto工具包: http://code.taobao.org/mvn/repository/com/alibaba/citrus/tool/antx-autoconfig/1.0.9/ant ...

随机推荐

  1. INTEL SSD SMART 性能 E8 E9 转

    如题今天研究了一下怎么看Intel SSD Toolbox里边显示的Smart信息.首先说,查看Intel SSD smart信息最好最方便的当然就是自家的工具箱,用其他工具查看不是不可以,但是很多数 ...

  2. 80x86 CPU 的工作模式

    8086/8088微处理器只有一种工作模式:实地址模式. 32为的80x86微处理器有3种工作模式:实地址模式.保护模式和虚拟8086模式.   实地址模式 对于8086/8088微处理器,实模式是它 ...

  3. pytest文档24-fixture的作用范围(scope)

    fixture作用范围 fixture里面有个scope参数可以控制fixture的作用范围:session > module > class > function fixture( ...

  4. spring Boot打可执行的jar包

    <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://mave ...

  5. jQuery2.0应用开发:SSH框架整合jQuery2.0实战OA办公自己主动化(VSS、operamasks-UI框架)

    我的qq是2059055336,对这个课程有兴趣的能够加我qq联系. 一.本课程是怎么样的一门课程(全面介绍)    1.1.课程的背景 jQuery 2.0 正式版公布.不在支持 IE 6/7/8  ...

  6. Arduino + SmartAirFilter 制作智能感应的 PM 空气净化器

    先说 SmartAirFilters 知道 SmartAirFilters 源自微博上转发的非常火的那个帖子,和动辄七八千元的商用产品比,几百元的 SmartAirFilters(下面简称电扇) 确实 ...

  7. 【BZOJ】【2527】【POI2011】Meteors

    整体二分+树状数组 整体二分……感谢zyf提供的入门题 简单粗暴的做法:枚举每一个国家,二分他的$w_i$,然后计算……然而这样效率很低…… 整体二分就是:对所有的国家一起进行二分,$w_i$在mid ...

  8. C语言:创建动态单向链表,创建完成后,输出每一个节点的数据信息。

    // //  main.c //  dynamic_link_list // //  Created by ma c on 15/8/5. //  Copyright (c) 2015. All ri ...

  9. 最小均方算法(LMS Algorithm)理论及DSP实现

    LMS算法可认为是机器学习里面最基本也比较有用的算法,神经网络中对参数的学习使用的就是LMS的思想,在通信信号处理领域LMS也非常常见,比如自适应滤波器. 本文主要对LMS(Least Mean Sq ...

  10. socket bind 随机端口

    https://www.cprogramming.com/code_blocks/ 这个地址可以下载c, c++的编译器,在windows下可以用的 IDE. bind到端口0上,系统就会自动分配,但 ...