spring-boot-assembly CHANGELOG

栏目: 软件资讯 · 发布时间: 7年前

内容简介:spring-boot-assembly 在spring boot项目中使用maven profiles和maven assembly插件根据不同环境打包成tar.gz或者zip 将spring boot项目中的配置文件提取到外部config目录中 将spring boot项目中的启动jar包移动到...

spring-boot-assembly

  1. 在spring boot项目中使用maven profiles和maven assembly插件根据不同环境打包成tar.gz或者zip

  2. 将spring boot项目中的配置文件提取到外部config目录中

  3. 将spring boot项目中的启动jar包移动到boot目录中

  4. 将spring boot项目中的第三方依赖jar包移动到外部lib目录中

  5. bin目录中是启动,停止,重启服务命令

  6. 打包后的目录结构类似于tomcat/maven目录结构

项目源码及下载

spring-boot-assembly CHANGELOG

1.2.RELEASE 2018-12-23

优化mvn-package.bat命令

1.1.RELEASE 2018-12-22

1.修复maven不同环境打包时,application.yml中profiles.active为对应环境

application.yml

profiles:
    active: @profileActive@

2.优化启动脚本

3.各个环境的端口号统一设置成了8080

4.修改assembly.xml文件,同时打包成tar.gz和zip

assembly.xml

<formats>
    <format>tar.gz</format>
    <format>zip</format>
</formats>

5.新增mvn-package.bat和mvn-package.sh快速打包脚本

默认指定local环境,可指定不同环境打包

window

mvn-package.bat dev

linux/mac

sh mvn-package.sh dev

6.assembly.xml和pom.xml文件的打包时包含*.jks文件,如有其它文件可自行设置

assembly.xml

<!-- 指定输出target/classes中的配置文件到config目录中 -->
<fileSet>
    <directory>${basedir}/target/classes</directory>
    <outputDirectory>config</outputDirectory>
    <fileMode>0644</fileMode>
    <includes>
        <include>application.yml</include>
        <include>application-${profileActive}.yml</include>
        <include>mapper/**/*.xml</include>
        <include>static/**</include>
        <include>templates/**</include>
        <include>*.xml</include>
        <include>*.properties</include>
        <include>*.jks</include>
    </includes>
</fileSet>

pom.xml

<resources>
    <!-- 资源文件配置 -->
    <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
            <include>application.yml</include>
            <include>application-${profileActive}.yml</include>
            <include>mapper/**/*.xml</include>
            <include>static/**</include>
            <include>templates/**</include>
            <include>*.xml</include>
            <include>*.properties</include>
            <include>*.jks</include>
        </includes>
    </resource>
</resources>

1.0.RELEASE 2018-12-16

  1. 完成spring boot项目使用maven-assembly-plugin等插件整合

  2. 将项目打包成tar.zip

  3. 抽取项目配置文件到config目录

  4. 抽取项目第三方依赖到lib目录

  5. 启动停止重启服务命令在bin目录

  6. 项目启动jar包在boot目录

  7. 项目启动及运行日志文件保存在logs目录


【声明】文章转载自:开源中国社区 [http://www.oschina.net]


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Artificial Intelligence

Artificial Intelligence

Stuart Russell、Peter Norvig / Pearson / 2009-12-11 / USD 195.00

The long-anticipated revision of this #1 selling book offers the most comprehensive, state of the art introduction to the theory and practice of artificial intelligence for modern applications. Intell......一起来看看 《Artificial Intelligence》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码