报错信息如下:java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration by searching packages upwards from the test. You can use @ContextConfiguration, @SpringBootTest(classes=...) or other Spring Test supported mechanisms to explicitly declare the con...
同时StringRedisTemplate上也标红:“无法自动装配。找不到 'StringRedisTemplate' 类型的 Bean。 ”
直接在SpringBootTest注解后面加上项目启动项名字就好了。
@SpringBootTest(classes = SpringbootApplication.class)