Spring Security + Spring-Boot测试控制器 我正在尝试测试家用控制器 @RequestMapping("/") @ResponseBody String home() { return "Hello World!"; } 我使用的是春季安全性,使用用户名"user",默认情况下使用密码进行测试,但是@PreAuthorize无法正常工作 @RunWith(SpringRunner.class) @SpringBoot .. 发布时间:2021-02-14 19:22:43 spring spring-boot junit spring-test spring-security-test 其他开发