是否从另一个模块导入XMLBeans文件?
我正在使用使用ApacheMaven构建的多模块Spring项目。我在模块(1)的resources文件夹中有一些XML bean。我想将它们导入位于模块(2)中的另一个XMLBeans文件中 我所知道的是,我必须使用:是否从另一个模块导入XMLBeans文件?,xml,spring,apache,javabeans,Xml,Spring,Apache,Javabeans,我正在使用使用ApacheMaven构建的多模块Spring项目。我在模块(1)的resources文件夹中有一些XML bean。我想将它们导入位于模块(2)中的另一个XMLBeans文件中 我所知道的是,我必须使用: <import resource="" /> 在资源属性中写入路径的正确方法是什么?如果可能,请举例说明 <import resource="classpath:resources/beans-config.xml" /> 当模块2应用程序运行
<import resource="" />
在资源属性中写入路径的正确方法是什么?如果可能,请举例说明
<import resource="classpath:resources/beans-config.xml" />
当模块2应用程序运行时,模块1 jar将位于类路径中,或者如果模块2是一个webapp,则模块1 jar将打包到war中。导入标记如何知道bean文件位于模块(1)中?在你的路径中没有提到任何与该模块相关的内容!关于这部分主题的官方文件太差了!
<dependency>
<groupId>module1.groupid</groupId>
<artifactId>module-1-artifact-id</artifactId>
<version>module1.version</version>
</dependency>