微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

java – 无法找到XML模式命名空间(JMS)的Spring命名空间处理程序

我正在尝试构建一个可执行jar并在运行时遇到以下错误

信息:从类路径资源[spring-app.xml]加载XML bean定义
线程“main”中的异常org.springframework.beans.factory.parsing.BeanDeFinitionParsingException:配置问题:无法找到XML架构命名空间的Spring NamespaceHandler [http://www.springframework.org/schema/jms]
违规资源:类路径资源[spring-app.xml]

我的spring-app.xml如下:

spring-beans.xsd
                http://www.springframework.org/schema/tx 
                http://www.springframework.org/schema/tx/spring-tx.xsd
                http://www.springframework.org/schema/context
                http://www.springframework.org/schema/context/spring-context.xsd
                http://www.springframework.org/schema/jms
                http://www.springframework.org/schema/jms/spring-jms.xsd">
fig.PropertyPlaceholderConfigurer"> 
    ssprovesbjms01.gmtl.viasat.com:1099diobjectfactorybean">
    jmstemplate" class="org.springframework.jms.core.jmstemplate">
    

而我的pom如下:

hornetq-listenerhornetq-listener.sourceEncoding>UTF-8.sourceEncoding>
    <hornetq.version>2.3.13.Finalhornetq.version>
    fig_DIR>/etc/viasat/vtb/fig_DIR>
cope>testcope>
    spring-beansspring-expressionspring-ormhornetqhornetq-commonshornetq.version}hornetqhornetq-core-clienthornetq.version}hornetqhornetq-jms-clienthornetq.version}slf4j-apifiguration>
                figuration>
        figuration>
                figuration>
        figuration>
                figuration>
            hornetq-listener
最佳答案
这是我添加到我的maven-shade-plugin并且它工作的内容.shade插件提供了附加jar文件中存在的资源的选项,如属性和xml文件. AppendingTransformer用于普通文件.XmlAppendingTransformer用于xml文件.

meta-inf/spring.handlersmeta-inf/spring.schemas

原文地址:https://www.jb51.cc/spring/431753.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐