导航

  • 引入依赖
  • 然后编写测试类:


引入依赖

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

然后编写测试类:

@RunWith(SpringRunner.class)
@SpringBootTest
public class BRoleControllerTest {

    @Autowired
    private StringRedisTemplate stringRedisTemplate;

    @Test
    public void test1(){
      
        
    }

}