springBoot maven打包[分层打包]

您所在的位置:网站首页 maven打包成war包怎么写poem文件 springBoot maven打包[分层打包]

springBoot maven打包[分层打包]

2023-03-24 07:08| 来源: 网络整理| 查看: 265

打jar包,很大,发服务器也慢。get到一种打包方式。直接挨着cv直接就能用

一、src目录下创建assembly文件夹下assembly.xml release-${platform} ${platform.format} true ./target/${output.software.name}/${output.software.name}-${output.software.version}.jar 755 ./target/${output.software.name}/${output.software.config} ${output.software.config} ./target/${output.software.name}/${output.software.libs} ${output.software.libs} 二、配置yml、pom,加入maven插件 spring: profiles: active: @spring.auto.active@ #多环境配置,读取的pom里面properties配置的熟悉     RedisService lib config 1.0.0 club.lyq.RedisService dev linux-x86_64 tar.gz     ${output.software.name}-${output.software.version} ${project.basedir}/lib BOOT-INF/lib/ **/*.jar src/main/resources true maven-resources-plugin utf-8 true copy-resources package copy-resources target/classes application.properties bootstrap.yml application.yml application-${spring.auto.active}.yml ${project.build.directory}/${output.software.name}/${output.software.config} org.apache.maven.plugins maven-jar-plugin application*.yml true ${output.software.libs}/ false ${output.software.mainclass} ./${output.software.config}/ ${project.build.directory}/${output.software.name} org.apache.maven.plugins maven-dependency-plugin copy-dependencies package copy-dependencies ${project.build.directory}/${output.software.name}/${output.software.libs} org.apache.maven.plugins maven-assembly-plugin src/assembly/assembly.xml make-assembly package single 三、执行maven打包命令,我直接用的idea的package

打包好后形成

lib:项目的依赖jar包

config:配置文件,如bootstrap.yml、application.yml、application.properties

jar:写的代码jar



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3