如何配置@HandlerChain指向JAR文件中的处理程序链配置文件? [英] How to configure @HandlerChain to point to a handler chain configuration file inside a JAR file?
问题描述
有没有办法引用在JAR文件中分发的处理程序配置文件(例如:handler.xml)?
Is there a way to reference a handler configuration file (e.g.: handler.xml) that is distributed inside a JAR file?
这样的事情: @HandlerChain(file =somefile.jar)
或 @HandlerChain(file =myhandler.xml)
,假设 myhandler.xml
存储在 somefile.jar
。
Something like this: @HandlerChain(file="somefile.jar")
or @HandlerChain(file="myhandler.xml")
, assuming that myhandler.xml
is stored in somefile.jar
.
推荐答案
对于使用
@HandlerChain批注的处理程序的服务器和客户端实现,必须将处理程序
配置的位置指定为来自带注释文件的相对路径或
绝对URL。例如:
For both server and client implementations of handlers using the @HandlerChain annotation, you must specify the location of the handler configuration as either a relative path from the annotated file or as an absolute URL. For example:
@HandlerChain(file =../../ common / handlers / myhandlers.xml)
或
@HandlerChain(file =http:// foo .com / myhandlers.xml)
取自 this doc。
这篇关于如何配置@HandlerChain指向JAR文件中的处理程序链配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!