在weblogic中使用外部属性文件 [英] Using external properties files in weblogic

查看:184
本文介绍了在weblogic中使用外部属性文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将我之前在JBOSS中部署的J2ee应用程序部署到Weblogic 10.3.1.0中。我遇到了外部属性文件的问题。在Jboss中我可以将属性文件放入$ JBOSS_HOME / server / default / conf中,然后将它们加载到系统类路径中,我可以毫无问题地访问它们。我能够将共享库放入$ MIDDLEWAREHOME / user_projects / domains / mydomain / lib中,并将它们加载到系统类路径中,没有任何问题,但我无法加载属性文件。

I am working on deploying a J2ee application that I have previously been deploying in JBOSS into Weblogic 10.3.1.0. I am running into an issue with external properties files. In Jboss I can just put the properties files into $JBOSS_HOME/server/default/conf, and they are loaded onto the system classpath and I can access them without any problems. I was able to put shared libraries into $MIDDLEWAREHOME/user_projects/domains/mydomain/lib and they were loaded into the system classpath without any problems but I am unable to load properties files.

有谁知道如何在Weblogic中包含外部属性文件?

Does anyone know how to include external properties files in Weblogic?

谢谢,

推荐答案

我想出了这个,让它以我期望的方式运作。首先,我尝试了上述建议。如果我将一个文件夹添加到我的类路径中,或者将属性文件放在我的类路径上的文件夹中,则会拾取文件中的jar,但不会拾取属性文件。如果我将我的属性文件放在一个jar中,并将它们放在我的类路径上的一个文件夹中,一切正常。但是每次做出改变时我都不想让我的文件变成jar。以下是我的环境。

I figured this out and have it working the way I would expect. First I did try the suggestions as above. If i added a folder to my classpath, or put the properties files in a folder on my classpath, the jars in the file were picked up, but not properties files. If i put my properties files in a jar, and put them in a folder on my classpath everything worked. But I did not want to have jar my files everytime a change was made. The following works in my env.

如果我将属性文件放在%WEBLOGIC_HOME%/ user_projects / domains / MYDOMAIN中,那么它们就会被拾取,而不必放在jar文件中。

If i place the properties files in %WEBLOGIC_HOME%/user_projects/domains/MYDOMAIN then they are getting picked up, without having to be placed in a jar file.

这篇关于在weblogic中使用外部属性文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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