如何配置@HandlerChain指向JAR文件中的处理程序链配置文件? [英] How to configure @HandlerChain to point to a handler chain configuration file inside a JAR file?

查看:632
本文介绍了如何配置@HandlerChain指向JAR文件中的处理程序链配置文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法引用在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屋!

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