需要在pom.xml引入spring-test
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>5.3.25</version> <scope>test</scope> </dependency>
即可解决自动装配为null问题
需要在pom.xml引入spring-test
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>5.3.25</version> <scope>test</scope> </dependency>
即可解决自动装配为null问题