PasswordEncoderConfig.java 522 字节
Newer Older
1
package com.youlai.system.config;
H
hxrui 已提交
2 3 4 5 6 7

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;

有来技术 已提交
8 9
/**
 * 密码编码器
H
horizons 已提交
10 11
 *
 * @author haoxr
12
 * @since 2022/10/21
有来技术 已提交
13
 */
H
hxrui 已提交
14 15
@Configuration
public class PasswordEncoderConfig {
郝先瑞 已提交
16

H
hxrui 已提交
17 18 19 20
    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }
郝先瑞 已提交
21

H
hxrui 已提交
22
}