Spring Security5.0登录报错There is no PasswordEncoder mapped for the id “null”
项目配置:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
</dependencies>
@RestController
public class TestController {
@RequestMapping("/")
public String index(){
return "hello springboot";
}