mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
5.0
This commit is contained in:
@@ -23,7 +23,7 @@ public class ExceptionExecutorImpl implements ExceptionExecutor {
|
|||||||
private static final String CONSTRAINT_VIOLATION_EXCEPTION = "ConstraintViolationException";
|
private static final String CONSTRAINT_VIOLATION_EXCEPTION = "ConstraintViolationException";
|
||||||
private static final String OPEN_EXCEPTION = "OpenException";
|
private static final String OPEN_EXCEPTION = "OpenException";
|
||||||
private static final String BIZ_ERROR_REGEX = "<OPEN_ERROR>(.*?)</OPEN_ERROR>";
|
private static final String BIZ_ERROR_REGEX = "<OPEN_ERROR>(.*?)</OPEN_ERROR>";
|
||||||
static Pattern PATTERN = Pattern.compile(BIZ_ERROR_REGEX, Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
|
private static final Pattern PATTERN = Pattern.compile(BIZ_ERROR_REGEX, Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ApiResponse executeException(ApiRequestContext apiRequestContext, Exception e) {
|
public ApiResponse executeException(ApiRequestContext apiRequestContext, Exception e) {
|
||||||
|
@@ -5,30 +5,7 @@
|
|||||||
<version>5.0.0-SNAPSHOT</version>
|
<version>5.0.0-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>swagger-plugin</name>
|
<name>sop-doc-plugin</name>
|
||||||
<description>Swagger plugin for Torna</description>
|
|
||||||
<url>https://gitee.com/durcframework/torna</url>
|
|
||||||
|
|
||||||
<licenses>
|
|
||||||
<license>
|
|
||||||
<name>MIT</name>
|
|
||||||
<url>https://mit-license.org/</url>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
|
||||||
<developers>
|
|
||||||
<developer>
|
|
||||||
<name>tanghc</name>
|
|
||||||
<email>thc8719@163.com</email>
|
|
||||||
<organization>gitee</organization>
|
|
||||||
<organizationUrl>https://gitee.com/durcframework/torna</organizationUrl>
|
|
||||||
</developer>
|
|
||||||
</developers>
|
|
||||||
<scm>
|
|
||||||
<connection>scm:git:https://gitee.com/durcframework/torna.git</connection>
|
|
||||||
<developerConnection>scm:git:https://gitee.com/durcframework/torna.git</developerConnection>
|
|
||||||
<url>https://gitee.com/durcframework/torna.git</url>
|
|
||||||
<tag>HEAD</tag>
|
|
||||||
</scm>
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- Generic properties -->
|
<!-- Generic properties -->
|
||||||
@@ -58,7 +35,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>fastjson</artifactId>
|
||||||
<version>1.2.83</version>
|
<version>2.0.52</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
@@ -102,13 +79,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-annotations</artifactId>
|
<artifactId>swagger-annotations</artifactId>
|
||||||
<version>1.5.19</version>
|
<version>1.6.14</version>
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-core</artifactId>
|
|
||||||
<version>2.4.0</version>
|
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@@ -11,10 +11,8 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import org.springframework.core.annotation.AnnotationUtils;
|
import org.springframework.core.annotation.AnnotationUtils;
|
||||||
import org.springframework.util.ReflectionUtils;
|
import org.springframework.util.ReflectionUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import sun.reflect.generics.repository.ClassRepository;
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.lang.reflect.Modifier;
|
import java.lang.reflect.Modifier;
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.lang.reflect.TypeVariable;
|
import java.lang.reflect.TypeVariable;
|
||||||
@@ -33,6 +31,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 解析文档信息
|
* 解析文档信息
|
||||||
|
*
|
||||||
* @author tanghc
|
* @author tanghc
|
||||||
*/
|
*/
|
||||||
public class ApiDocBuilder {
|
public class ApiDocBuilder {
|
||||||
@@ -106,6 +105,7 @@ public class ApiDocBuilder {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成文档信息
|
* 生成文档信息
|
||||||
|
*
|
||||||
* @param paramClass 参数类型
|
* @param paramClass 参数类型
|
||||||
* @return 返回文档内容
|
* @return 返回文档内容
|
||||||
*/
|
*/
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
<groupId>com.gitee.sop</groupId>
|
<groupId>com.gitee.sop</groupId>
|
||||||
<artifactId>sop-doc-plugin</artifactId>
|
<artifactId>sop-doc-plugin</artifactId>
|
||||||
<version>5.0.0-SNAPSHOT</version>
|
<version>5.0.0-SNAPSHOT</version>
|
||||||
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- dubbo依赖 -->
|
<!-- dubbo依赖 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
Reference in New Issue
Block a user