1.Optional
java Optional用法_shylhd的博客-CSDN博客_java optional
2.BeanUtils.transform,BeanUtils.copyProperties
3.数据库连接断开CommunicationsException: Communications link failure
将检测时间设置短一点:
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 timeBetweenEvictionRunsMillis: 10000
4.springboot 连接pgsql:1)添加依赖 2)配置文件
5.git提交代码后不见了:找回:
1)右键项目名,选择local history 2)选择show history 3)点击左边的目录,在右边查看是否有自己修改过的文件,若有单击文件右键,show Difference 查看暂存区与本地厂库的区别,若有自己的代码,点击Revert Selection
6.java姓名转拼音加处理多音字
java姓名转拼音加处理多音字_大白熊_BlankBear的博客-CSDN博客_java姓名转拼音
7.启动时报错:'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointe
1)问题分析:因为Springfox 使用的路径匹配是基于AntPathMatcher的,而Spring Boot 2.6.X使用的是PathPatternMatcher。
2)修复方案:SpringBoot版本不降级解决方案
<!-- Swagger3依赖 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
配置文件:
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
8.mapper与xml文件绑定:1)包名一致 2)方法名一致