0

I have 2 spring boot apps, and I want one of them to extend the configuration properties of the other. Everything works fine in Eclipse when I run the project as a maven spring boot app, however, when I run the jar or mvn spring-boot: run, I'm getting:

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

I've searched all over and tried many variations, including:

Here's part of the configuration class:

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

I'm guessing running as a jar doesn't load the external jar in the configuration. Any thoughts/hints? Thanks!

Community
  • 1
  • 1
Dave
  • 55
  • 5
  • First `@ComponentScan` should be on a `@Configuration` class. Second including a spring boot app in a spring boot app will not work. As a spring boot jar isn't a regular jar (it has a specific structure). – M. Deinum Apr 11 '17 at 12:14
  • Thanks for the quick response! Would you help me understand why it works in Eclipse, when I choose Run > Spring Boot App? – Dave Apr 11 '17 at 14:53
  • I suspect both projects are in the same workspace and in my experience in eclipse everything that is in the workspace is also on the class path. – M. Deinum Apr 11 '17 at 15:02

0 Answers0