方法1. 使用mvn插件打包(推荐)
pom代码
org.apache.maven.plugins maven-surefire-plugin 2.22.2 true org.apache.maven.plugins maven-compiler-plugin 3.8.1 1.8 UTF-8 org.springframework.boot spring-boot-maven-plugin true com.iristar.TestApplication repackage repackage
启动脚本
set path=%PATH%;dlljava -jar ./target/evalserver-1.0-SNAPSHOT.jar spring.config.addition-location=./application.properties #!/bin/bashexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./dll java -jar ./target/evalserver-1.0-SNAPSHOT.jar spring.config.addition-location=./application.properties
方法2. 使用 idea的Artifacts打包
方法3. 使用package打包
pom代码
org.springframework.boot spring-boot-maven-plugin -Dfile.encoding=UTF-8 com.iristar.center.ht.ApiServer org.apache.maven.plugins maven-surefire-plugin true org.apache.maven.plugins maven-compiler-plugin 1.8 utf8 -XDignore.symbol.file true org.codehaus.mojo appassembler-maven-plugin 2.0.0 Make Assembly package assemble unix windows ${project.build.directory}/product lib bin conf true src/main/resources flat UTF-8 logs tmp com.iristar.center.ht.ApiServer ApiServer -server -Xmx2G -Xms2G -Dfile.encoding=UTF-8