您的位置:首页 > 理论基础 > 计算机网络

Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/sc

2017-06-21 15:38 399 查看

程序在IDEA中运行正常,但是用Gradle的shadowJar插件打包成jar包到linux虚拟机上执行时报错了!

报错信息如下:

Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/context]


后来在build.gradle文件中的shadowJar中的mergeServiceFiles()括号中加了’META-INF/spring.*’解决了:

shadowJar {
zip64 true
mergeServiceFiles('META-INF/spring.*')
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  spring idea gradle
相关文章推荐