在weblogic 10.3中加载属性文件
我有一个访问大量属性文件的应用程序。在 jboss 5.1 中,我们可以从 conf 目录加载它。我想知道 weblogic 10.3 中是否有加载属性文件的方法。
我不想将其包含在 jar 中并放置在 lib 中,因为这些属性文件是可配置文件。用户需要配置应用程序的某些属性。
另外,将属性文件放在域目录中也不是很好,我也想知道是否有其他方法可以实现相同的目的。
问候 拉杰
I have an application which acesses a lot of property files. In jboss 5.1 we can load this from the conf directory. I would like to know if there is any such way of loading the property files in weblogic 10.3 .
I don't want to include it in an jar and place in the lib,since these property files are configurable files. The user needs to configure certain properties of the application.
Also placing the property files in the domain directory is not very good and I also would like to know if there is any other way of achieving the same .
Regards
Raj
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将应用程序所需的属性文件放置到 Weblogic 的类路径中,然后从 WAR/JAR/EAR 中删除这些文件。
如果您选择的特定文件夹尚未在您的类路径中,只需登录 Weblogic 控制台,然后浏览环境 -> 即可。服务器-> [您的服务器名称]->配置->服务器启动
现在只需将包含属性文件的文件夹添加到类路径中。
You can place the properties files needed by your application(s) to the classpath of Weblogic and then remove the files from your WAR/JAR/EAR.
If you choose a specific folder that is not yet in your classpath, just log on the Weblogic console, and navigate through Environment -> Servers -> [Your server name] -> Configuration -> Server Start
Now it is just about adding the folder containing your properties file(s) to the classpath.