diff --git a/zlt-business/file-center/src/main/resources/application.yml b/zlt-business/file-center/src/main/resources/application.yml index a0ee2d8d..b5741b6f 100644 --- a/zlt-business/file-center/src/main/resources/application.yml +++ b/zlt-business/file-center/src/main/resources/application.yml @@ -21,7 +21,7 @@ springdoc: api-docs: path: /v3/api-docs group-configs: - - group: 'file' + - group: 'default' paths-to-match: '/**' packages-to-scan: com.central.file.controller default-flat-param-object: true diff --git a/zlt-business/user-center/src/main/resources/application.yml b/zlt-business/user-center/src/main/resources/application.yml index 123f260d..41885be3 100644 --- a/zlt-business/user-center/src/main/resources/application.yml +++ b/zlt-business/user-center/src/main/resources/application.yml @@ -21,7 +21,7 @@ springdoc: api-docs: path: /v3/api-docs group-configs: - - group: 'user' + - group: 'default' paths-to-match: '/**' packages-to-scan: com.central.user.controller default-flat-param-object: true diff --git a/zlt-commons/zlt-oss-spring-boot-starter/src/main/java/com/central/oss/properties/FileServerProperties.java b/zlt-commons/zlt-oss-spring-boot-starter/src/main/java/com/central/oss/properties/FileServerProperties.java index 0cea8a70..28288093 100644 --- a/zlt-commons/zlt-oss-spring-boot-starter/src/main/java/com/central/oss/properties/FileServerProperties.java +++ b/zlt-commons/zlt-oss-spring-boot-starter/src/main/java/com/central/oss/properties/FileServerProperties.java @@ -15,7 +15,6 @@ import org.springframework.stereotype.Component; @Setter @Getter @ConfigurationProperties(prefix = FileServerProperties.PREFIX) -@Component public class FileServerProperties { public static final String PREFIX = "zlt.file-server"; public static final String TYPE_FDFS = "fastdfs"; diff --git a/zlt-commons/zlt-oss-spring-boot-starter/src/main/resources/META-INF/spring.factories b/zlt-commons/zlt-oss-spring-boot-starter/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 43d799a7..00000000 --- a/zlt-commons/zlt-oss-spring-boot-starter/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,2 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -com.central.oss.config.OssAutoConfigure \ No newline at end of file diff --git a/zlt-commons/zlt-oss-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/zlt-commons/zlt-oss-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..3abb13b2 --- /dev/null +++ b/zlt-commons/zlt-oss-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.central.oss.config.OssAutoConfigure diff --git a/zlt-gateway/sc-gateway/pom.xml b/zlt-gateway/sc-gateway/pom.xml index a1300774..ccd5f63d 100644 --- a/zlt-gateway/sc-gateway/pom.xml +++ b/zlt-gateway/sc-gateway/pom.xml @@ -54,10 +54,10 @@ - + org.springframework.cloud @@ -78,10 +78,10 @@ knife4j-gateway-spring-boot-starter - + com.baomidou mybatis-plus-extension @@ -94,10 +94,6 @@ eu.bitwalker UserAgentUtils - - org.springframework.security.oauth - spring-security-oauth2 - diff --git a/zlt-gateway/sc-gateway/src/main/java/com/central/gateway/error/JsonErrorWebExceptionHandler.java b/zlt-gateway/sc-gateway/src/main/java/com/central/gateway/error/JsonErrorWebExceptionHandler.java index 17ae7acc..c22adee6 100644 --- a/zlt-gateway/sc-gateway/src/main/java/com/central/gateway/error/JsonErrorWebExceptionHandler.java +++ b/zlt-gateway/sc-gateway/src/main/java/com/central/gateway/error/JsonErrorWebExceptionHandler.java @@ -7,7 +7,6 @@ import org.springframework.boot.web.error.ErrorAttributeOptions; import org.springframework.boot.web.reactive.error.ErrorAttributes; import org.springframework.context.ApplicationContext; import org.springframework.http.HttpStatus; -import org.springframework.security.oauth2.common.exceptions.InvalidTokenException; import org.springframework.web.reactive.function.server.*; import java.util.HashMap; @@ -91,12 +90,13 @@ public class JsonErrorWebExceptionHandler extends DefaultErrorWebExceptionHandle private int getHttpStatus(Throwable error) { int httpStatus; - if (error instanceof InvalidTokenException) { + /*if (error instanceof InvalidTokenException) { InvalidTokenException ex = (InvalidTokenException)error; httpStatus = ex.getHttpErrorCode(); } else { httpStatus = HttpStatus.INTERNAL_SERVER_ERROR.value(); - } + }*/ + httpStatus = HttpStatus.INTERNAL_SERVER_ERROR.value(); return httpStatus; } } diff --git a/zlt-gateway/sc-gateway/src/main/resources/application.yml b/zlt-gateway/sc-gateway/src/main/resources/application.yml index dbdfba45..b73d27b3 100644 --- a/zlt-gateway/sc-gateway/src/main/resources/application.yml +++ b/zlt-gateway/sc-gateway/src/main/resources/application.yml @@ -85,12 +85,22 @@ spring: knife4j: gateway: enabled: true - discover: - excluded-services: ${spring.application.name} + strategy: manual + routes: + - name: 用户服务 + service-name: user-center + url: /api-user/v3/api-docs/default + context-path: /api-user + - name: 文件服务 + service-name: file-center + url: /api-file/v3/api-docs/default + context-path: /api-file + +# discover: +# version: openapi3 +# excluded-services: ${spring.application.name} zlt: - swagger-agg: - generate-routes: user,file oauth2: token: store: