Q:

Wiring a bean from dependency module

I have created a configuration project which essentially creates couple of beans with configuration stereotype. Then, I want this project to be reused across by my clients. 
I have added this config project as a maven dependency, but my client project is not having those beans i have created as part of configuration project. 
Could someone help 

A:

Ok, the answer is the following: you should place 
@ComponentScan("you.configurations.base.package")

on one of your configuration (in the current application, one that @SpringBootApplication sees) or on the class with @SpringBootApplication annotation.
The explanation is as follows: @SpringBootApplication under the hood contains @ComponentScan without specifying a base package. That means that it says to Spring to scan the package where the class annotated with @SpringBootApplication resides and all the packages recursively. And that's it. If you place you @Configuration somewhere there - it will create it during startup, otherwise not.

