25 lines
559 B
Java
25 lines
559 B
Java
package com.youlai.boot.config;
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
|
|
/**
|
|
* 密码编码器
|
|
*
|
|
* @author Ray.Hao
|
|
* @since 2024/12/3
|
|
*/
|
|
@Configuration
|
|
public class PasswordEncoderConfig {
|
|
|
|
/**
|
|
* 密码编码器
|
|
*/
|
|
@Bean
|
|
public PasswordEncoder passwordEncoder() {
|
|
return new BCryptPasswordEncoder();
|
|
}
|
|
}
|