Spring Boot: How to specify the PasswordEncoder?

前端 未结 15 1201
醉梦人生
醉梦人生 2020-12-02 06:27

Currently I got the main class:

package com.recweb.springboot;

import org.springframework.boot.SpringApplication;
im         


        
15条回答
  •  孤街浪徒
    2020-12-02 06:58

    Use NoOpPasswordEncoder for inMemoryAuthentication

    auth.inMemoryAuthentication()
        .withUser("user")
        .password("{noop}password")
        .roles("USER")
    

提交回复
热议问题