【发布时间】:2013-12-03 21:16:14
【问题描述】:
基本上我有这个 Outer.jar,在其中声明是一个带有组件扫描的应用程序上下文:
<context:component-scan
base-package="x.y.z.class" />
但是这个x.y.z.class 在一个inner.jar 中,它是outer.jar 的一个依赖项,
我收到一个错误,即 class not found .../Outer.jar/x/y/z/class,如何指定检查 inner.jar?
更新: 将应用程序上下文初始化为:
org.springframework.context.ApplicationContext ctx =
new ClassPathXmlApplicationContext("applicationContext.xml");
exception: I/O failure during classpath scanning; nested exception is java.io.FileNotFoundException: ..\default\deploy\test.war\WEB-INF\lib\inner.jar\x\y\z
and it says inner.jar/x/y/z/class not found
Outer.jar 有 inner.jar 作为依赖项
【问题讨论】:
标签: java spring jar autowired applicationcontext