随笔分类 -  java——spring boot

摘要:连接网址:https://blog.csdn.net/sunzixiao/article/details/125860842 三、复杂、嵌套的json字符串 复杂的是json字符串里面嵌套json数组,这也是转换的重点,例如: 在这里推荐几个比较好用的json字符串校验和格式化的网站:链接: htt 阅读全文
posted @ 2023-01-31 22:09 小白龙白龙马
摘要:多层嵌套JSON类型数据解析 简单来说: “key”:“value” --> 此时value为String “key":0 --> 此时value为int “key”:{“k1”:“v1”} --> 此时value为JSONObject “key”:[v] --> 此时value为JSONArray 阅读全文
posted @ 2023-01-31 21:00 小白龙白龙马
摘要:引入依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> </dependency> 打开idea左上角File->Settings->搜索 阅读全文
posted @ 2023-01-29 22:11 小白龙白龙马
摘要:https://www.bilibili.com/video/BV1824y1f7tJ/?spm_id_from=333.337.search-card.all.click&vd_source=79bbd5b76bfd74c2ef1501653cee29d6 https://www.cnblogs. 阅读全文
posted @ 2023-01-27 19:17 小白龙白龙马
摘要:根据请求方式,去决定使用哪种方法 同一种请求方式,也可以通过参数的不同,再决定使用哪种方式 get localhost:8080/get get localhost:8080/get/{1} get 查询用户 findbyall 有参数,就使用findbyone 阅读全文
posted @ 2023-01-27 16:24 小白龙白龙马
摘要:https://www.cnblogs.com/xiaobaibailongma/p/16974031.html package org.example.controller.requestparam; import org.springframework.http.MediaType; impor 阅读全文
posted @ 2023-01-27 16:07 小白龙白龙马
摘要:package org.example.controller.requestparam; import org.apache.ibatis.jdbc.Null; import org.springframework.http.HttpHeaders; import org.springframewo 阅读全文
posted @ 2023-01-27 15:22 小白龙白龙马
摘要:package org.example.controller.requestparam; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotatio 阅读全文
posted @ 2023-01-27 14:50 小白龙白龙马
摘要:常用注解 下面介绍一下常用的几个注解: @Setter 注解在类或字段,注解在类时为所有字段生成setter方法,注解在字段上时只为该字段生成setter方法。 @Getter 使用方法同上,区别在于生成的是getter方法。 @ToString 注解在类,添加toString方法。 @Equals 阅读全文
posted @ 2023-01-25 09:48 小白龙白龙马
摘要:CorsConfig package org.example.cors.config; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config 阅读全文
posted @ 2023-01-23 20:48 小白龙白龙马
摘要:拦截器注册: package org.example.interceptor_hz.config; import org.example.interceptor_hz.interceptor.FirstHandlerInterceptor; import org.example.intercepto 阅读全文
posted @ 2023-01-23 14:40 小白龙白龙马
摘要:代码配置: package org.example.webFilter.config; import org.example.webFilter.filter.FirstFilter; import org.example.webFilter.listener.FirstListener; impo 阅读全文
posted @ 2023-01-23 11:22 小白龙白龙马
摘要:Filter过滤器及其作用介绍 https://blog.csdn.net/pingyufeng/article/details/127550532 【Springboot | 过滤器】配置类和注解两种方式 FirstFilter package org.example.webFilter; imp 阅读全文
posted @ 2023-01-22 23:19 小白龙白龙马
摘要:package org.example.Exception; public class MyException extends RuntimeException { private int code; private String msg; public MyException(String msg 阅读全文
posted @ 2023-01-22 22:26 小白龙白龙马
摘要:PS,访问资源,引入如下: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> 自定义注解: pac 阅读全文
posted @ 2023-01-21 23:44 小白龙白龙马
摘要:自定义一个类: MyException package org.example.Exception; public class MyException extends Exception { private static final long serialVersionUID = 1L; publi 阅读全文
posted @ 2023-01-21 23:31 小白龙白龙马
摘要:拦截器示例: 控制器: package org.example.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMa 阅读全文
posted @ 2023-01-18 22:49 小白龙白龙马