first
parent
730e75d920
commit
3b424b233e
|
@ -4,6 +4,8 @@ import org.applesline.desensitize.aop.DesensitizeAdvice;
|
||||||
import org.applesline.desensitize.executor.DesensitizeExecutor;
|
import org.applesline.desensitize.executor.DesensitizeExecutor;
|
||||||
import org.applesline.desensitize.executor.JsonPathDesensitizeExecutor;
|
import org.applesline.desensitize.executor.JsonPathDesensitizeExecutor;
|
||||||
import org.applesline.desensitize.handle.DesensitizeHandlerSelector;
|
import org.applesline.desensitize.handle.DesensitizeHandlerSelector;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@ -15,11 +17,13 @@ import org.springframework.context.annotation.Configuration;
|
||||||
public class AutoDesensitizeConfiguration {
|
public class AutoDesensitizeConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(DesensitizeHandlerSelector.class)
|
||||||
public DesensitizeHandlerSelector maskHandlerSelector() {
|
public DesensitizeHandlerSelector maskHandlerSelector() {
|
||||||
return new DesensitizeHandlerSelector();
|
return new DesensitizeHandlerSelector();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(DesensitizeExecutor.class)
|
||||||
public DesensitizeExecutor maskSensitiveExecutor(DesensitizeHandlerSelector desensitizeHandlerSelector) {
|
public DesensitizeExecutor maskSensitiveExecutor(DesensitizeHandlerSelector desensitizeHandlerSelector) {
|
||||||
return new JsonPathDesensitizeExecutor(desensitizeHandlerSelector);
|
return new JsonPathDesensitizeExecutor(desensitizeHandlerSelector);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue