SpringBoot jar启动脚本

mac2026-06-21  0

springboot/start.sh  

nohup java -jar -Xms1024m -Xmx1024m -Dspring.config.location=/opt/springboot/config/data-index.yml /opt/springboot/data-index-1.0.0.jar > /opt/springboot/logs/data-index.out 2>&1 & tail -f /opt/springboot/logs/data-index.out

指定项目启动时运行内存。Xms 是指设定程序启动时占用内存大小。Xmx 是指设定程序运行期间最大可占用的内存大小。 指定运行jar包的位置: /opt/springboot/data-index-1.0.0.jar  指定spring.config.location = /opt/springboot/config/data-index.yml优先级最高的配置文件 显示输出的日志: /opt/springboot/logs/data-index.out (不建议使用,此进程没有被关掉)

最新回复(0)