소스 검색

swagger支持

Raod 2 년 전
부모
커밋
e5780a4c0e

+ 2 - 1
report-core/src/main/java/com/anjiplus/template/gaea/business/ReportApplication.java

@@ -4,7 +4,7 @@ import com.anji.plus.gaea.annotation.enabled.EnabledGaeaConfiguration;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.ComponentScans;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
 
 /**
  * 业务模板
@@ -21,6 +21,7 @@ import org.springframework.context.annotation.ComponentScans;
         "com.anjiplus.template.gaea.business.modules.*.**.dao",
         "com.anji.plus.gaea.*.module.*.dao"
 })
+@EnableSwagger2
 public class ReportApplication {
     public static void main( String[] args ) {
         SpringApplication.run(ReportApplication.class);

+ 1 - 1
report-core/src/main/resources/bootstrap.yml

@@ -99,7 +99,7 @@ logging:
 # 本应用自定义参数
 customer:
   # 跳过token验证和权限验证的url清单
-  skip-authenticate-urls: /gaeaDict/all, /login, /static, /file/download/, /index.html, /favicon.ico, /reportShare/detailByCode
+  skip-authenticate-urls: /gaeaDict/all, /login, /static, /file/download/, /index.html, /favicon.ico, /reportShare/detailByCode, /v2/api-docs
   file:
     #导入导出临时文件夹 默认.代表当前目录,拼接/tmp_zip/目录
     tmpPath: .