If your scan path is not passed to the context object, use the following constructor:

AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("com.itheima");
0 Answer
If your scan path is not passed to the context object, use the following constructor:
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("com.itheima");
add a @service annotation to take a look and try it, usually is injected interface, so so coupling degree is not particularly high, implementation class often changes, but interface changes frequently
这家伙很懒,什么都没留下...