package com.tuoheng;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

@SpringBootApplication
public class TuohengOidcAdminApplication {

    public static void main(String[] args) {
        SpringApplication.run(TuohengOidcAdminApplication.class, args);
        System.out.println("TuoHeng-Oidc-Admin 启动成功~");
    }

    /**
     * 注册bean -> 测试 spring  security 加密获取密码密文
     * @return
     */
    @Bean
    public PasswordEncoder passwordEncoder(){
        return new BCryptPasswordEncoder();
    }

}
