开发者社区 问答 正文

用fat jar打包后 spring配置出错 打包前没问题

用fat jar打包项目后报错如下:

 
Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinit
ionParsingException: Configuration problem: Unable to locate Spring NamespaceHan
dler for XML schema namespace [http://www.springframework.org/schema/context]
Offending resource: class path resource [spring-jdbc.xml]

main函数:

 
public class Test {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext(new String[]
                {"spring-jdbc.xml","pyc-spring-quartz.xml","spring-mvc.xml"});
    }
}
 

展开
收起
爵霸 2016-06-02 09:25:25 2312 分享 版权
0 条回答
写回答
取消 提交回答