简体   繁体   English

在.war文件下创建一个Java属性文件

[英]create a java-properties file beneath the .war file

When I export my Dynamic Web Project, I want that the .properties file is in the same folder as the .war file. 导出动态Web项目时,我希望.properties文件与.war文件位于同一文件夹中。 Oh and I need both the Windows and the linux variants of the solution if there is a difference. 哦,如果有区别,我需要解决方案的Windows和linux变体。 (I already read here how to create and read from a .properties) I want the user to be able to edit the .properties file (我已经在这里阅读如何创建和读取.properties文件)我希望用户能够编辑.properties文件

I recommend setting your project up using mavens war plugin. 我建议使用mavens war插件设置项目。 You can add an option to put resources were you want in the war file. 您可以添加一个选项,将所需的资源放入war文件中。 See the link below. 请参阅下面的链接。

https://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html https://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM