Affects: \
I have multi-module build using Gradle. There are 2 independent spring projects in it. 1 of the projects is working as expected but 2nd project is not scanning any beans either in the same package or sub packages. Below are the things that I have tried (including the comments), but it's not working. Only thing that worked was ImportAutoConfiguration and mentioning the classes in sub-packges.
@SpringBootApplication(scanBasePackages = {"io.comany.logs.functionality"})
//@ImportAutoConfiguration( classes = {Test.class, DecorationManager.class, Consumer.class})
//@ComponentScan(basePackages = {"io.comany.logs.functionality"})
public class Main {
public static void main(String[] args) {
SpringApplication.run(Main.class, args);
}
}
Comment From: bclozel
Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use the issue tracker only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.
In this case, you should describe more your application with actual snippets for classes (including packages) and build files.