From f80bf47bec9812766afd0d53be611dc130718c7f Mon Sep 17 00:00:00 2001 From: HuangXin Date: Wed, 12 Aug 2020 14:36:15 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E6=9B=B4=E6=96=B0pom?= =?UTF-8?q?=E8=84=9A=E6=89=8B=E6=9E=B6=EF=BC=8C=E7=A7=BB=E9=99=A4tomcat?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E7=94=A8undertow=202.=20=E5=88=A0=E9=99=A4Sw?= =?UTF-8?q?agger2=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 60 ++++++------------- .../com/dispose/swagger/Swagger2Config.java | 53 ---------------- 2 files changed, 19 insertions(+), 94 deletions(-) delete mode 100644 src/main/java/com/dispose/swagger/Swagger2Config.java diff --git a/pom.xml b/pom.xml index bd6a0be8..52115273 100644 --- a/pom.xml +++ b/pom.xml @@ -4,9 +4,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.cmcc.hy - phoenix-boot - 0.0.4 + org.springframework.boot + spring-boot-starter-parent + 2.2.9.RELEASE + + + com.dispose @@ -15,6 +18,9 @@ phoenix_ddos_handle Demo project for Spring Boot + 1.8 + Greenwich.SR3 + 2.1.3.Final UTF-8 @@ -38,18 +44,6 @@ org.springframework.boot spring-boot-starter-undertow - - org.apache.tomcat.embed - tomcat-embed-core - - - org.apache.tomcat - tomcat-annotations-api - - - 9.0.31 - - org.springframework.boot spring-boot-starter-aop @@ -68,15 +62,17 @@ io.springfox springfox-swagger2 + 3.0.0 io.springfox springfox-swagger-ui + 3.0.0 com.alibaba fastjson - 1.2.58 + 1.2.73 net.sf.json-lib @@ -89,12 +85,12 @@ mysql mysql-connector-java - 8.0.21 org.mybatis.spring.boot mybatis-spring-boot-starter + 2.1.0 org.apache.commons @@ -117,15 +113,13 @@ commons-io commons-io - - - oro - oro + 2.6 com.google.guava guava + 29.0-jre @@ -135,46 +129,30 @@ cn.hutool hutool-all + 5.3.10 tk.mybatis mapper-spring-boot-starter + 2.1.0 com.github.pagehelper pagehelper-spring-boot-starter + 1.2.9 com.cmcc enc.dec + 1.3.1 commons-codec commons-codec - - redis.clients - jedis - - - org.objenesis - objenesis - - - io.protostuff - protostuff-core - - - io.protostuff - protostuff-runtime - - - com.google.protobuf - protobuf-java - org.apache.commons commons-pool2 diff --git a/src/main/java/com/dispose/swagger/Swagger2Config.java b/src/main/java/com/dispose/swagger/Swagger2Config.java deleted file mode 100644 index 3e43b7e2..00000000 --- a/src/main/java/com/dispose/swagger/Swagger2Config.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.dispose.swagger; - -import com.dispose.config.MyConfig; -import com.google.common.base.Predicates; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import springfox.documentation.builders.PathSelectors; -import springfox.documentation.builders.RequestHandlerSelectors; -import springfox.documentation.service.ApiInfo; -import springfox.documentation.service.Contact; -import springfox.documentation.spi.DocumentationType; -import springfox.documentation.spring.web.plugins.Docket; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -import javax.annotation.Resource; -import java.util.Collections; - -/** - * The type Swagger 2 config. - * - * @author - */ -@Configuration -@EnableSwagger2 -public class Swagger2Config { - - @Resource - private MyConfig myConfig; - - /** - * Api docket. - * - * @return the docket - */ - @Bean - public Docket api() { - return new Docket(DocumentationType.SWAGGER_2).enable(Boolean.parseBoolean(myConfig.getSwaggerSwitch())) - .select().apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()) - // 错误路径不监控 - .paths(Predicates.not(PathSelectors.regex("/error.*"))) - // 对根下所有路径进行监控 - .paths(PathSelectors.regex("/.*")) - .build().apiInfo(apiInfo()); - } - - private ApiInfo apiInfo() { - return new ApiInfo( - "phoenix脚手架工程API示例", "展示所有API信息,方便测试", "API V1.0", "xxx", new Contact("phoenix", - "http://git.komect.net/WLFHCZ/phoenix_share_framework.git", "phoenix@cmhi.chinamobile.com"), - "CMCC.HY", "", Collections.emptyList()); - } - -}