Skip to content

Commit

Permalink
[enhancement] update tosan-mask dependency version
Browse files Browse the repository at this point in the history
  • Loading branch information
mosidev committed Nov 17, 2023
1 parent 15e4f42 commit 3e7fafd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
</scm>

<properties>
<spring-boot.version>3.1.4</spring-boot.version>
<spring-boot.version>3.1.5</spring-boot.version>
<spring-cloud.version>2022.0.4</spring-cloud.version>
<tosan.mask.version>2.0.2</tosan.mask.version>
<tosan.mask.version>2.1.0</tosan.mask.version>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.test.skip>false</maven.test.skip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.tosan.client.http.resttemplate.starter.util.HttpLoggingInterceptorUtil;
import com.tosan.tools.mask.starter.config.SecureParameter;
import com.tosan.tools.mask.starter.config.SecureParametersConfig;
import com.tosan.tools.mask.starter.configuration.MaskBeanConfiguration;
import com.tosan.tools.mask.starter.replace.JacksonReplaceHelper;
import com.tosan.tools.mask.starter.replace.JsonReplaceHelperDecider;
import com.tosan.tools.mask.starter.replace.RegexReplaceHelper;
Expand All @@ -14,32 +15,29 @@

import java.util.HashSet;

import static com.tosan.tools.mask.starter.configuration.MaskBeanConfiguration.SECURED_PARAMETERS;

@Configuration
public class ExternalHttpClientAutoConfiguration {

@Bean({"http-client-util-regex-replace-helper"})
@ConditionalOnMissingBean(name = "http-client-util-regex-replace-helper")
public JsonReplaceHelperDecider replaceHelperDecider(JacksonReplaceHelper jacksonReplaceHelper,
RegexReplaceHelper regexReplaceHelper,
@Qualifier("http-client-util-secured-parameters")
SecureParametersConfig secureParametersConfig) {
public JsonReplaceHelperDecider replaceHelperDecider(
JacksonReplaceHelper jacksonReplaceHelper, RegexReplaceHelper regexReplaceHelper,
@Qualifier("http-client-util-secured-parameters") SecureParametersConfig secureParametersConfig) {
return new JsonReplaceHelperDecider(jacksonReplaceHelper, regexReplaceHelper, secureParametersConfig);
}

@Bean({"http-client-util-secured-parameters"})
@ConditionalOnMissingBean(name = "http-client-util-secured-parameters")
public SecureParametersConfig secureParametersConfig() {
HashSet<SecureParameter> securedParameters = new HashSet<>(SECURED_PARAMETERS);
HashSet<SecureParameter> securedParameters = new HashSet<>(MaskBeanConfiguration.SECURED_PARAMETERS);
securedParameters.add(Constants.AUTHORIZATION_SECURE_PARAM);
securedParameters.add(Constants.PROXY_AUTHORIZATION_SECURE_PARAM);
return new SecureParametersConfig(securedParameters);
}

@Bean
public HttpLoggingInterceptorUtil httpLoggingInterceptorUtil(@Qualifier("http-client-util-regex-replace-helper")
JsonReplaceHelperDecider replaceHelperDecider) {
public HttpLoggingInterceptorUtil httpLoggingInterceptorUtil(
@Qualifier("http-client-util-regex-replace-helper") JsonReplaceHelperDecider replaceHelperDecider) {
return new HttpLoggingInterceptorUtil(replaceHelperDecider);
}
}

0 comments on commit 3e7fafd

Please sign in to comment.