mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-22 20:54:25 +08:00
注入 手机令牌提供者
This commit is contained in:
parent
a3d6182c18
commit
f9d11e48d1
@ -58,8 +58,10 @@ public class WebSecurityConfigurer extends WebSecurityConfigurerAdapter {
|
||||
.anyRequest().authenticated().and().csrf().disable();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public PhoneAuthenticationProvider phoneAuthenticationProvider() {
|
||||
/**
|
||||
* 不要直接使用@Bean注入 会导致默认的提供者无法注入(DaoAuthenticationProvider)
|
||||
*/
|
||||
private PhoneAuthenticationProvider phoneAuthenticationProvider() {
|
||||
PhoneAuthenticationProvider phoneAuthenticationProvider = new PhoneAuthenticationProvider();
|
||||
phoneAuthenticationProvider.setPasswordEncoder(passwordEncoder());
|
||||
phoneAuthenticationProvider.setUserDetailsService(userDetailsService);
|
||||
|
@ -8,7 +8,7 @@ db:
|
||||
user: ${MYSQL_USER:root}
|
||||
password: ${MYSQL_PWD:root}
|
||||
url:
|
||||
0: jdbc:mysql://${MYSQL_HOST:pig-mysql}:${MYSQL_PORT:3333}/${MYSQL_DB:pig_config}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
0: jdbc:mysql://${MYSQL_HOST:pig-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pig_config}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
|
||||
|
||||
nacos:
|
||||
|
Loading…
Reference in New Issue
Block a user