I have two projects. First one is main-app, second-one is base-app. I try to include second-app in main-app. Normally, I can handle it easily with using ComponentScan("com.example.base")
but I’m looking for an alternative for it, such as spring.factories
Do you have any suggestion?
I’ve tried with spring.factories
like below, but i didn’t work.
My base conf:
@Slf4j
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan("com.example.base")
public class BaseConf {
}
My spring.factories
under META-INF/spring.factories
:
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=
com.example.base.BaseConf
Is there any suggestion?
My main conf:
@Slf4j
@SpringBootConfiguration
@EnableAutoConfiguration
//@ComponentScan("com.example.base") -> I know it works very well but it is generic so I couldn't use a static component-scan.
public class MainConf {
}