1, When my dictionary tree likes these, the error "@EnableAsync annotation metadata was not injected" occurs。
2, But when my dictionary tree likes this, the error doesn't happen.
3, When I wire Bean with application.xml, and the dictionary tree likes paragraph one, but the error also doesn't happen.
So what I am so confirmed is that @ComponentScan's work when wiring Bean without application.xml?
This is a classic bug when first making a spring application, it is better to have all your classes in a package, never put your classes in the "default" (src.main.java) package.
Read more here from chapter "2. Structuring Your Code" to "3. Configuration Classes":