The project management tool is maven, which has just started learning spring and mybatis. In the process of integrating spring and mybatis, I encountered a problem. Why can’t I not add annotations to a test class @ContextConfigurat?Ion?
If you use SpringJUnit4ClassRunner to start the Spring container, the container will manage your object before you can use automatic injection. The problem with NPE is that the container is not started.