有没有办法引用在 JAR 文件中分发的处理程序配置文件(例如:handler.xml)?
类似这样的东西:@HandlerChain(file="somefile.jar")
或 @HandlerChain(file="myhandler.xml")
,假设 myhandler.xml
存储在 somefile.jar
中。
最佳答案
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")
or
@HandlerChain(file="http://foo.com/myhandlers.xml")
取自this文档。
关于java - 如何配置@HandlerChain 以指向JAR 文件中的处理程序链配置文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7908726/