Spring Boot 打包分离依赖 JAR 和配置文件
标签:exclude dir sources cto includes close mic http lse
1 2 1.8 3 UTF-8 4
5 c:/makeCode/${name}/ 6
7 false 8
9 true 10 true 11 12
13 14 ………………
15 16
17 18 19
20 21 org.apache.maven.plugins 22 maven-clean-plugin
23 24
25 26 27 ${directory} 28 29 30 31 32
33
34 35 org.apache.maven.plugins 36 maven-jar-plugin
37 38
39 40 *.** 41 42
43 44 true
45
46 lib/ 47
48 false 49
50 com.madaima.ipmanagement.IpManagementApplication 51 52
53 ${directory} 54 55 56
57
58 59 org.apache.maven.plugins 60 maven-dependency-plugin
61 62 63 copy-dependencies 64 package 65 66 copy-dependencies 67 68 69 70 ${directory}/lib/
71 72 73 74 75 76
77
78 79 maven-resources-plugin
80 81 82 copy-resources 83 package 84 85 copy-resources 86 87 88 89 90 src/main/resources 91
92 93 *.** 94 95 96 97 ${directory}/config 98 99 100 101 102 103
View Code
这样配置后,打包出来的文件就在,c:/makeCode/pom文件中的name/
config中是配置文件,lib文件中是依赖jar包
直接
就可以启动了
Spring Boot 打包分离依赖 JAR 和配置文件
标签:exclude dir sources cto includes close mic http lse
原文地址:https://www.cnblogs.com/ztgzlu/p/11011125.html
评论