如何设置可执行的Spring Boot jarfile的JVM属性? [英] How do I set the JVM properties of an executable Spring Boot jarfile?

查看:90
本文介绍了如何设置可执行的Spring Boot jarfile的JVM属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为对的后续问题,我如何构建Springd jar文件,使systemd可以直接作为服务执行该文件?,如何设置可执行Spring Boot jarfile的JVM属性?例如,如何设置最大堆大小(即-Xmx2048m)?

解决方案

your-app.conf放置在your-app.jar旁边并包含内容

JAVA_OPTS=-Xmx2048M

请参阅How do I build a Spring Boot jarfile that systemd can execute directly as a service?, how do I set the JVM properties of an executable Spring Boot jarfile? For example, how do I set the maximum heap size (i.e. -Xmx2048m)?

解决方案

Place your-app.conf next to your-app.jar with content

JAVA_OPTS=-Xmx2048M

Refer to deployment script customization guide or launch.script for details.

这篇关于如何设置可执行的Spring Boot jarfile的JVM属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆