打包成 fastjar

打包

set JAVA_HOME=D:\\java\\jdk1.8.0_121
mvn clean package -DskipTests -Pproduction

windows 启动

java -jar target\tio-boot-web-hello-0.0.1-SNAPSHOT.jar

linux 启动

java -jar tio-boot-web-hello-0.0.1-SNAPSHOT.jar --app.env=prod

指定 app.env 为 pord 后会自动读取 app-prod.properties 中的配置,如果不指定默认是 app.properties 测试请求

curl http://localhost/

打包后文件 tio-boot-web-hello-0.0.1-SNAPSHOT.jar 只有 8.28M,启动时间只用了不到 1s,windows 占用的内存 70M