本文共 542 字,大约阅读时间需要 1 分钟。
配置文件如下:
active对应prodspring.profiles.active=prod#端口这是server.port=8089#日志路径logging.config=classpath:configs/prod/log4j2.xml
prod的配置文件
spring.profiles.active=prod#端口server.port=8082#日志路径logging.config=classpath:configs/prod/log4j2.xml#音频的静态资源文件spring.mvc.static-path-pattern=/audio/**#热部署生效spring.devtools.restart.enabled: true#classpath目录下的WEB-INF文件夹内容修改不重启spring.devtools.restart.exclude: /audio/**
spring.profiles.active=dev#端口这是server.port=8081#日志路径logging.config=classpath:configs/dev/log4j2.xml
打包指令
java -jar Dspring.profiles.active=prod
转载地址:http://wczun.baihongyu.com/