摘要:
原文链接:https://blog.csdn.net/qq_42228663/article/details/125149383 可以使用 Collections. unmodifiableCollection(Collection c) 方法来创建一个只读集合,这样改变集合的任何操作都会抛出 Ja 阅读全文
摘要:
RestTemplate的默认处理响应类型为application/json,但接口返回数据格式为text/html,RestTemplate无法转换信息报错:UnknownContentTypeException 阅读全文
摘要:
使用@NotNull和@Nullable避免编码中出现空指针异常 阅读全文
摘要:
CountDownLatch使用示例demo import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import java.util.*; import java.util.concurrent.CountDownLatch; i 阅读全文
摘要:
原文链接: https://blog.csdn.net/LT11hka/article/details/103531653 1.在idea应用市场搜索Mybatis log plugin,进行下载 大部分都能在这里找到,如果没有可以到官网上下载 2.安装之后在工具栏中启动 这里点击之后就会启动,此时 阅读全文
摘要:
public class RuntimeDemo { public static void main(String[] args) throws IOException { //获取Runtime类对象 Runtime runtime = Runtime.getRuntime(); //返回 Jav 阅读全文
摘要:
常用的校验API Assert org.springframework.util.Assert **用途:**可用在controller校验参数上,并由全局异常捕获器捕捉IllegalArgumentException,返回友好提示 **缺点:**不能返回业务的异常码,不过可参考改写成适合自己的 / 阅读全文
摘要:
数字正则 原文链接: [正则表达式 整数](http://www.cnblogs.com/freexiaoyu/archive/2008/12/17/1356690.html) 内容摘自原文和评论 正则 ^[1-9]\d*$ //匹配正整数 ^[1-9]\\d*|0$ //匹配整数(推荐) -0,0 阅读全文
摘要:
利用stream将字符串 12,45,89 转成List 阅读全文
摘要:
@RequiredArgsConstructor 注解 @RequiredArgsConstructor 生成带有必需参数的构造函数。 必需的参数是最终字段和具有约束的字段,例如@NonNull 。 完整的文档可在@lconstructor的项目lombok功能页面上找到 。即使未列出,该注释也具有 阅读全文