|
@@ -1,6 +1,7 @@
|
|
|
package com.txz.backstage.configurer;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.txz.backstage.core.ProjectConstant;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
@@ -11,6 +12,7 @@ import springfox.documentation.swagger.web.SwaggerResource;
|
|
|
import springfox.documentation.swagger.web.SwaggerResourcesProvider;
|
|
|
import reactor.core.publisher.Flux;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -20,6 +22,10 @@ public class WebFluxConfig {
|
|
|
@Value("${swagger.resource}")
|
|
|
private String swaggerResource;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private Parameters parameters;
|
|
|
+
|
|
|
+
|
|
|
// @Bean
|
|
|
// public CorsWebFilter corsWebFilter() {
|
|
|
// CorsConfiguration config = new CorsConfiguration();
|
|
@@ -37,6 +43,7 @@ public class WebFluxConfig {
|
|
|
|
|
|
@Bean
|
|
|
public SwaggerResourcesProvider swaggerResourcesProvider() {
|
|
|
+ ProjectConstant.application = parameters.getApplication();
|
|
|
return () -> {
|
|
|
List<SwaggerResource> resources = new ArrayList<>();
|
|
|
resources.add(swaggerResource("backstage", "/v2/api-docs", "1.0"));
|