摘要: @RestControllerAdvice public class GlobalExceptionHandler { /** * 前端请求的数据为json类型,后台校验失败,出现的异常 * org.springframework.web.bind.MethodArgumentNotValidExc 阅读全文
posted @ 2020-12-08 19:42 RowanG 阅读(77) 评论(0) 推荐(0)
摘要: 默认使用JdkSerializationRedisSerializer 修改为Jackson2JsonRedisSerializer 配合org.springframework.cache.annotation使用 <dependency> <groupId>org.springframework. 阅读全文
posted @ 2020-12-08 15:41 RowanG 阅读(200) 评论(0) 推荐(0)
摘要: frp下载url:https://github.com/fatedier/frp/releases 服务端Linux frps.ini配置 [common] bind_port = 7000 #http服务,Frp对外暴露端口,一定要放开端口,外部才能访问 vhost_http_port = 808 阅读全文
posted @ 2020-12-02 10:50 RowanG 阅读(1468) 评论(0) 推荐(0)
摘要: /** * springboot启动类 */ @SpringBootApplication @EnableCaching // 开启缓存 public class SpringbootCacheApplication { public static void main(String[] args) 阅读全文
posted @ 2020-11-03 19:35 RowanG 阅读(193) 评论(0) 推荐(0)
摘要: 异常 程序中的异常 程序在运行过程中,发生了非正常的事件,影响了程序的执行,叫做异常。 异常大的种类 1)不可控的异常 Exception in thread "main" java.lang.OutOfMemoryError: Java heap space ​ at com.sxt.day03. 阅读全文
posted @ 2020-11-03 09:02 RowanG 阅读(43) 评论(0) 推荐(0)