java-ee – 使用IntelliJ Path Variables,如何在Tomcat服务器运行配置中设置系统属性?

栏目: Java · 发布时间: 5年前

内容简介:您可以通过将其添加到“VM选项”输入字段,在Tomcat服务器运行/调试配置窗口中直接设置VM选项.您可以直接将-Dcustom_property =值放入该字段,然后通过System.getProperty(“customer_property”)访问它.翻译自:https://stackoverflow.com/questions/15255184/using-intellij-path-variables-how-to-set-system-properties-in-tomcat-server-ru
Eclipse

中,您可以设置-D选项以包含在IDE设置中其他位置定义的变量. IntelliJ似乎为路径变量提供此功能.但是,如果您按照他们的帮助文档,您应该能够在$dollar_characters $之间引用这些变量.进一步的研究似乎表明,这仅适用于项目文件的内部,并且在构建期间进行替换.

我正在尝试创建一个共享服务器配置,其中一些系统属性可以被其他开发人员换掉,但这个让我感到难过.

您可以通过将其添加到“VM选项”输入字段,在Tomcat服务器运行/调试配置窗口中直接设置VM选项.您可以直接将-Dcustom_property =值放入该字段,然后通过System.getProperty(“customer_property”)访问它.

翻译自:https://stackoverflow.com/questions/15255184/using-intellij-path-variables-how-to-set-system-properties-in-tomcat-server-run


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

We Are the Nerds

We Are the Nerds

Christine Lagorio-Chafkin / Hachette Books / 2018-10-2 / USD 18.30

Reddit hails itself as "the front page of the Internet." It's the third most-visited website in the United States--and yet, millions of Americans have no idea what it is. We Are the Nerds is an eng......一起来看看 《We Are the Nerds》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试