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

相关文章

这篇文章主要介绍了spring的事务传播属性REQUIRED_NESTED的原...
今天小编给大家分享的是一文解析spring中事务的传播机制,相...
这篇文章主要介绍了SpringCloudAlibaba和SpringCloud有什么区...
本篇文章和大家了解一下SpringCloud整合XXL-Job的几个步骤。...
本篇文章和大家了解一下Spring延迟初始化会遇到什么问题。有...
这篇文章主要介绍了怎么使用Spring提供的不同缓存注解实现缓...