Weblogic 配置 - 首选 web-inf-classes [英] Weblogic Configuration - prefer-web-inf-classes
问题描述
必须为 Web-INF 中指定的类指定 prefer-web-inf-classes 以优先于 weblogic 服务器的应用程序库中存在的类.我有一个特殊情况,我需要类加载器使用 WEB-INF 文件夹中的一个特定 jar.有没有办法做到这一点?
prefer-web-inf-classes has to be specified for the classes specified in Web-INF to take precendence over classes present in application library of weblogic server. I have a special case where I need the class loader to use one specific jar from WEB-INF folder. Is there any way of doing this?
推荐答案
您可能需要查看 过滤类加载器?
这允许在逐个包级别指定要使用的类加载器.
This allows to specify on a package-by-package level just which classloader to use.
不过,您要非常注意这一点.你确定你已经进入CLassloader地狱,所以你必须诉诸这种东西,而且真的别无选择?
You want to be very careful with this, though. Are you sure you already are in CLassloader Hell, so you must resort to this kind of stuff, and there's really no alternative?
您是否考虑将 JAR 放入 EAR 的 APP-INF/lib
文件夹中?或者将除了 WEB-INF/lib 中需要的所有内容" 移到 APP-INF/lib 中?
Did you consider putting the JAR into the APP-INF/lib
folder of your EAR? Or move "all but the one you need in WEB-INF/lib" out to APP-INF/lib?
这篇关于Weblogic 配置 - 首选 web-inf-classes的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!