1. 升级springboot版本至2.2.1

2. 修改swagger-bootstrap-ui部分代码,使其支持不同域名间调试
This commit is contained in:
b2baccline
2019-11-18 16:23:37 +08:00
parent 7b7811a4f2
commit fbfb604b5f
9 changed files with 7358 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
package com.hccake.ballcat.admin;
import com.hccake.ballcat.commom.log.access.annotation.EnableAccessLog;
import com.hccake.ballcat.common.swagger.annotation.EnableSwagger2Aggregator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
@@ -9,7 +10,7 @@ import org.springframework.boot.web.servlet.ServletComponentScan;
* @author Hccake
*/
/*@EnableXxlJob*/
/*@EnableSwagger2Aggregator*/
@EnableSwagger2Aggregator
@EnableAccessLog
@ServletComponentScan("com.hccake.ballcat.admin.oauth.filter")
@SpringBootApplication

View File

@@ -55,6 +55,7 @@ public class CustomResourceServerConfigurer extends ResourceServerConfigurerAdap
"/swagger-resources/**",
"/swagger-ui.html**",
"/webjars/**",
"/bycdao-ui/**",
"favicon.ico").permitAll()
.anyRequest().authenticated()

View File

@@ -54,7 +54,7 @@ swagger:
license: Powered By BallCat
licenseUrl: http://www.ballcat.cn/
terms-of-service-url: http://www.ballcat.cn/
host: http://localhost:9090
host: http://ballcat-api:9090
contact:
name: Hccake
email: chengbohua@foxmail.com

View File

@@ -3,6 +3,7 @@ package com.hccake.ballcat.common.swagger;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
@@ -13,6 +14,7 @@ import java.util.List;
* @date 2019/11/1 19:37
*/
@Data
@Component
@ConfigurationProperties("swagger")
public class SwaggerProperties {
/**

View File

@@ -23,7 +23,7 @@ import org.springframework.web.filter.CorsFilter;
@ConditionalOnProperty(name = "swagger.enabled", havingValue = "true", matchIfMissing = true)
public class SwaggerProviderAutoConfiguration {
@Value("${swagger.aggregator.origin: http://localhost:8080}")
@Value("${swagger.aggregator.origin:http://localhost:8080}")
private String aggregatorOrigin;
/**

View File

@@ -2,6 +2,7 @@ package com.hccake.ballcat.common.swagger;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import springfox.documentation.swagger.web.SwaggerResource;
import java.util.ArrayList;
@@ -13,6 +14,7 @@ import java.util.List;
* @date 2019/11/1 20:05
*/
@Data
@Component
@ConfigurationProperties("swagger.provider")
public class SwaggerProviderProperties {

View File

@@ -9,7 +9,7 @@ import java.lang.annotation.*;
* @author Hccake
* @version 1.0
* @date 2019/11/1 19:43
* 聚合者的swagger开启注解
* 提供者的swagger开启注解
*/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)

View File

@@ -25,7 +25,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spring-boot.version>2.1.8.RELEASE</spring-boot.version>
<spring-boot.version>2.2.1.RELEASE</spring-boot.version>
<spring-platform.version>Cairo-SR8</spring-platform.version>
<org.mapstruct.version>1.3.0.Final</org.mapstruct.version>
@@ -34,7 +34,6 @@
<simple-cache.version>0.0.4</simple-cache.version>
<swagger.core.version>1.5.2</swagger.core.version>
<xxl-job.version>2.1.0</xxl-job.version>
<spring-security.version>5.1.6.RELEASE</spring-security.version>
<spring-security-oauth2.version>2.3.6.RELEASE</spring-security-oauth2.version>
</properties>
@@ -132,12 +131,6 @@
<artifactId>spring-security-oauth2</artifactId>
<version>${spring-security-oauth2.version}</version>
</dependency>
<!-- spring-security -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring-security.version}</version>
</dependency>
<!--hutool工具类-->
<dependency>
<groupId>cn.hutool</groupId>