springboot
蝈蝈噶蝈蝈噶
这个作者很懒,什么都没留下…
展开
-
Spring Aop @Around
1、引入pom <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.9.6</version> </dependency> import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.la原创 2021-08-19 11:06:11 · 115 阅读 · 0 评论 -
Spring 全局异常处理
import com.alibaba.fastjson.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework...原创 2021-08-19 11:00:15 · 145 阅读 · 0 评论 -
Spring 拦截器
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.web.method.HandlerMethod; import org.springframework.web.s..原创 2021-08-19 10:58:33 · 202 阅读 · 0 评论 -
Springboot 图片上传
import com.alibaba.fastjson.JSONObject; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.we..原创 2021-08-17 17:16:36 · 183 阅读 · 0 评论 -
Spring拦截requestBody和reponseBody做数据加密解密
1、主要实现类 import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.MethodParameter; import org.springframework.http.HttpInputMessage; import org.springframework.http.MediaType; import org.springframework.http.convert.原创 2021-08-11 09:51:36 · 1116 阅读 · 0 评论