醉了,一般这个注入不都是在类顶上注入嘛,这个可好,跑到
ScAuthApplication 中去注入了。。搞了半天,也记录一下吧
这里先说一下,其实就是在启动类中,去配置:
package cn.gov.rongcheng.scauth;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
@SpringBootApplication
public class ScAuthApplication {
//1........加上这个Bean注入这个就好了.
@Bean
public BCryptPasswordEncoder bCryptPasswordEncoder(){ //这里注入了就可以了
&nbs