摘要: 1.前后端不分离的项目 public class GlobalExceptionResvoler implements HandlerExceptionResolver { @Override public ModelAndView resolveException(HttpServletReque 阅读全文
posted @ 2021-10-08 23:41 code-G 阅读(240) 评论(0) 推荐(0) 编辑
摘要: @Configuration public class RedisTemplateConfig { @Autowired public RedisTemplateConfig(RedisTemplate redisTemplate) { //创建jackson的序列化方式 Jackson2JsonR 阅读全文
posted @ 2021-10-08 23:37 code-G 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 1.自定义XXXGatewayFilterFactory继承AbstractGatewayFilterFactory 2.实现apply和shortcutxxx方法 @Component public class TokenGatewayFilterFactory extends AbstractG 阅读全文
posted @ 2021-10-08 23:36 code-G 阅读(241) 评论(0) 推荐(0) 编辑
摘要: //全局异常处理类 @Configuration public class GlobalExceptionConfiguration implements ErrorWebExceptionHandler { //日志对象 private static final Logger log = Logg 阅读全文
posted @ 2021-10-08 23:31 code-G 阅读(1286) 评论(0) 推荐(0) 编辑