♻️ Refactoring code. supoort knife4j doc

This commit is contained in:
lbw committed 2023-01-02 18:10:30 +08:00
1 parent 524fac64a3
commit c3ebcc491e
4 files changed
+4 -67

No files matched your search

+3 -3
View File
@@ -26,7 +26,7 @@
<oracle.version>21.3.0.0</oracle.version>
<sqlserver.version>8.4.1.jre8</sqlserver.version>
<dm.version>8.1.2.79</dm.version>
<knife4j.version>4.0.0</knife4j.version>
<knife4j.version>3.0.3</knife4j.version>
<swagger.core.version>2.2.0</swagger.core.version>
<springdoc.version>1.6.9</springdoc.version>
<mp.weixin.version>4.4.0</mp.weixin.version>
@@ -232,9 +232,9 @@
<version>${springdoc.version}</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<groupId>io.springboot</groupId>
<artifactId>knife4j-openapi3-ui</artifactId>
<version>${knife4j.version}</version>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
@@ -1,54 +0,0 @@
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.pig4cloud.pigx.common.gateway.support;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import java.util.ArrayList;
import java.util.List;
/**
* Ribbon 配置
*
* @author L.cm
*/
@Getter
@Setter
@RefreshScope
@ConfigurationProperties("ribbon.rule")
public class PigxRibbonRuleProperties {
/**
* 是否开启,默认:true
*/
private boolean enabled = Boolean.TRUE;
/**
* 是否开启灰度路由,默认:false
*/
private boolean grayEnabled;
/**
* 优先的ip列表,支持通配符,例如:10.20.0.8*、10.20.0.*
*/
private List<String> priorIpPattern = new ArrayList<>();
}
+1 -1
View File
@@ -99,7 +99,7 @@
</dependency>
<!--引入Knife4j的官方ui包-->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<groupId>io.springboot</groupId>
<artifactId>knife4j-openapi3-ui</artifactId>
</dependency>
</dependencies>
@@ -10,15 +10,6 @@ spring:
server-addr: ${NACOS_HOST:pigx-register}:${NACOS_PORT:8848}
config:
server-addr: ${spring.cloud.nacos.discovery.server-addr}
gateway:
routes:
# 固定路由转发配置 无修改
- id: openapi
uri: lb://pigx-gateway
predicates:
- Path=/v3/api-docs/**
filters:
- RewritePath=/v3/api-docs/(?<path>.*), /$\{path}/$\{path}/v3/api-docs
config:
import:
- optional:nacos:application-@profiles.active@.yml