mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-11 13:19:01 +08:00
♻️ Refactoring code. 优化配置参数
This commit is contained in:
1 parent
d7bb25f416
commit
a800457f7a
3 files changed
+6
-6
No files matched your search
+4
-4
@@ -38,14 +38,14 @@ public class OssAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(OssTemplate.class)
|
||||
@ConditionalOnProperty(name = "oss.endpoint")
|
||||
OssTemplate awsTemplate() {
|
||||
@ConditionalOnProperty(name = "oss.enable", havingValue = "true", matchIfMissing = true)
|
||||
public OssTemplate ossTemplate() {
|
||||
return new OssTemplate(properties);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(name = "oss.enable", havingValue = "true")
|
||||
public OssEndpoint awsEndpoint(OssTemplate template) {
|
||||
@ConditionalOnProperty(name = "oss.public", havingValue = "true", matchIfMissing = true)
|
||||
public OssEndpoint ossEndpoint(OssTemplate template) {
|
||||
return new OssEndpoint(template);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class OssProperties {
|
||||
* false supports virtual-hosted-style 阿里云等需要配置为
|
||||
* virtual-hosted-style 模式{http://bucketname.endpoint}
|
||||
*/
|
||||
private Boolean pathStyleAccess;
|
||||
private Boolean pathStyleAccess = true;
|
||||
|
||||
/**
|
||||
* 应用ID
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ public class ValidateCodeGatewayFilter extends AbstractGatewayFilterFactory {
|
||||
try {
|
||||
String header = request.getHeaders().getFirst(HttpHeaders.AUTHORIZATION);
|
||||
String clientId = WebUtils.extractClientId(header).orElse(null);
|
||||
if (clientId != null && filterIgnorePropertiesConfig.getClients().contains(clientId)) {
|
||||
if (StrUtil.isNotBlank(clientId) && filterIgnorePropertiesConfig.getClients().contains(clientId)) {
|
||||
return chain.filter(exchange);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user