Spring引导从另一个Spring引导应用程序扩展配置时配置FileNotFoundException

时间:2017-04-11 12:03:25

标签: java eclipse maven spring-boot jar

我有2个春季启动应用程序,我希望其中一个扩展另一个的配置属性。当我将项目作为maven spring boot应用程序运行时,Eclipse中的一切工作正常,但是,当我运行jar或mvn spring-boot:run时,我得到:

org.springframework.beans.factory.BeanDefinitionStoreException: 
Failed to parse configuration class [com.xyz.integration.app.my.Application]; nested exception is java.io.FileNotFoundException: 
class path resource [com/xyz/integration/app/pdfthing/ConfigurationManager.class] cannot be opened because it does not exist

我已经搜遍了所有并尝试了很多变化,包括:

以下是配置类的一部分:

@Component
@ComponentScan("classpath:com/xyz/integration/app/pdfthing")
public class MyConfigurationManager extends ConfigurationManager{

我猜测运行时jar不会在配置中加载外部jar。有什么想法/提示吗?谢谢!

0 个答案:

没有答案