My project is situated in package home.bank_application. There are a lot of subpackages, such as 'controller', 'dao', 'service', 'config' etc...
When I annotated my WebConfigClass as @ComponentScan(basePackages = "home.bank_application") my subpackages aren't scaned.
When I annotated my WebConfigClass as @ComponentScan(basePackages = {"home.bank_application.controller", "home.bank_application.dao","home.bank_application.service", "home.bank_application.config"}), all these packages are scaned fine.
But when I annotated my WebConfigClass as @ComponentScan(basePackages = "home.bank_application") my subpackages aren't scaned.
What is the problem?
I found the solution of this problem. @ComponentScan(basePackages = "home.bank_application") and @ComponentScan(basePackages = "home.bank_application.*") NOT the same things. All problem was in
*in the end of path!!!