I've solved this problem this way.
In IntelliJ all of your packages should be in a sub package which is the sub package of main/java.
For example I've put all of my packages under src/main/java/com.misisol.watchStore/ and spring could find my beans then after.