优化任务删除方法,核心代码注释
This commit is contained in:
@@ -5,11 +5,24 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
|
||||
/**
|
||||
* 安全配置类
|
||||
*
|
||||
* 配置安全相关的 Bean,如密码编码器等。
|
||||
*/
|
||||
@Configuration
|
||||
public class SecurityBeanConfig {
|
||||
|
||||
/**
|
||||
* 创建密码编码器
|
||||
*
|
||||
* <p>使用 BCrypt 算法对密码进行加密,BCrypt 是一种安全的密码哈希算法,
|
||||
* 具有自动加盐和可配置的计算复杂度特性。
|
||||
*
|
||||
* @return BCryptPasswordEncoder 实例
|
||||
*/
|
||||
@Bean
|
||||
public PasswordEncoder passwordEncoder() {
|
||||
return new BCryptPasswordEncoder();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user