【发布时间】:2016-02-11 15:16:45
【问题描述】:
我想在我们将启动 Spring Boot 应用程序的主 Spring Boot 类中传递 JVM 参数。
能否请您分享如何在 Spring Boot 应用程序中设置 JVM 参数?
我尝试了以下选项,但没有运气
System.setProperty("http.proxyHost", "X.X.X.X");
System.setProperty("http.proxyPort", "8080");
或者你可以将它用于春季启动
bootRun {
systemProperties "property1": "value1", "property2": "value2"
}
【问题讨论】:
标签: spring spring-mvc spring-boot