From 738bb70703214f5622f9e2e14dee6277e67ff0df Mon Sep 17 00:00:00 2001 From: suxiaolin Date: Wed, 27 Mar 2019 18:47:58 +0800 Subject: [PATCH 1/9] fix --- pom.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 4a1eaf7..56d830a 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.neatlife jframework - 0.0.2 + 0.0.4 jframework https://github.com/neatlife/jframework 基于对spring boot的二次封装,目的是减少重复代码,提高开发效率 @@ -146,10 +146,6 @@ jframework - - org.springframework.boot - spring-boot-maven-plugin - org.apache.maven.plugins From b9ffeddd211f5e7ab43b2616aad22ce28cba75e6 Mon Sep 17 00:00:00 2001 From: suxiaolin Date: Sat, 30 Mar 2019 19:16:35 +0800 Subject: [PATCH 2/9] 0.0.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 56d830a..299eca6 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.neatlife jframework - 0.0.4 + 0.0.5 jframework https://github.com/neatlife/jframework 基于对spring boot的二次封装,目的是减少重复代码,提高开发效率 From c5f321bfd04519a2ff15428eadbc62467b8edeca Mon Sep 17 00:00:00 2001 From: suxiaolin Date: Mon, 8 Apr 2019 20:17:57 +0800 Subject: [PATCH 3/9] 0.0.8 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 299eca6..273d333 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.neatlife jframework - 0.0.5 + 0.0.8 jframework https://github.com/neatlife/jframework 基于对spring boot的二次封装,目的是减少重复代码,提高开发效率 From 5ae271c730c334f752867f812ea14f243073248f Mon Sep 17 00:00:00 2001 From: suxiaolin Date: Thu, 11 Apr 2019 18:42:26 +0800 Subject: [PATCH 4/9] 0.0.9 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 273d333..c451f32 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.neatlife jframework - 0.0.8 + 0.0.9 jframework https://github.com/neatlife/jframework 基于对spring boot的二次封装,目的是减少重复代码,提高开发效率 From 93d324c6c300cd253fcf5e1395f086d6ec341141 Mon Sep 17 00:00:00 2001 From: suxiaolin Date: Fri, 12 Apr 2019 18:54:25 +0800 Subject: [PATCH 5/9] 0.0.10 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c451f32..9940696 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.neatlife jframework - 0.0.9 + 0.0.10 jframework https://github.com/neatlife/jframework 基于对spring boot的二次封装,目的是减少重复代码,提高开发效率 From e78557e0b3174585a86fa8495ba52042f5d8d80c Mon Sep 17 00:00:00 2001 From: suxiaolin Date: Tue, 23 Apr 2019 22:13:35 +0800 Subject: [PATCH 6/9] add BusinessException Handler --- pom.xml | 1 - .../handler/ControllerExceptionHandler.java | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4a1eaf7..66f0ee1 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,6 @@ org.projectlombok lombok - true org.springframework.boot diff --git a/src/main/java/com/github/neatlife/jframework/handler/ControllerExceptionHandler.java b/src/main/java/com/github/neatlife/jframework/handler/ControllerExceptionHandler.java index ef157ee..f96cf56 100644 --- a/src/main/java/com/github/neatlife/jframework/handler/ControllerExceptionHandler.java +++ b/src/main/java/com/github/neatlife/jframework/handler/ControllerExceptionHandler.java @@ -1,12 +1,18 @@ package com.github.neatlife.jframework.handler; +import com.github.neatlife.jframework.exception.BusinessRuntimeException; +import com.github.neatlife.jframework.http.HttpCode; +import com.github.neatlife.jframework.http.Response; +import com.google.common.collect.Maps; import lombok.extern.slf4j.Slf4j; import org.springframework.core.annotation.AnnotationUtils; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; import javax.servlet.http.HttpServletRequest; +import java.util.Map; /** * @author suxiaolin @@ -24,4 +30,11 @@ public String handleException(HttpServletRequest request, Exception e) throws Ex return e.getMessage(); } + + @ExceptionHandler({BusinessRuntimeException.class}) + @ResponseBody + public Response handlerBusinessException(BusinessRuntimeException ex) { + return new Response(HttpCode.INTERNAL_SERVER_ERROR.toString(), ex.getMessage(), Maps.newHashMap()); + } + } From ba3f5123db9573f3d83639af720b5e7b1d795e85 Mon Sep 17 00:00:00 2001 From: suxiaolin Date: Thu, 25 Apr 2019 12:33:12 +0800 Subject: [PATCH 7/9] 0.0.11 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e2259a1..930f7ad 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.neatlife jframework - 0.0.10 + 0.0.11 jframework https://github.com/neatlife/jframework 基于对spring boot的二次封装,目的是减少重复代码,提高开发效率 From 60c4bf195e68213ec2ee70bd7fd7588ce73461f8 Mon Sep 17 00:00:00 2001 From: suxiaolin Date: Sun, 5 May 2019 08:01:44 +0800 Subject: [PATCH 8/9] rename ApiClass to ApiReferer --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 930f7ad..d2f8f19 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.neatlife jframework - 0.0.11 + 0.0.12 jframework https://github.com/neatlife/jframework 基于对spring boot的二次封装,目的是减少重复代码,提高开发效率 From 70f9d8b93c476e0c074b88a665cc918acdd929a6 Mon Sep 17 00:00:00 2001 From: suxiaolin Date: Fri, 24 May 2019 16:27:30 +0800 Subject: [PATCH 9/9] version 0.0.13 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d2f8f19..461efe9 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.neatlife jframework - 0.0.12 + 0.0.13 jframework https://github.com/neatlife/jframework 基于对spring boot的二次封装,目的是减少重复代码,提高开发效率