自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

原创 SpringBoot配置文件加载顺序

当存在application.yml和application.properties配置文件时,如果存在相同配置项,那么application.properties会覆盖application.yml。6.jar包外部的application-{profile}.properties或application.yml(带spring.profile)配置文件。8.jar包外部的application.properties或application.yml(不带spring.profile)配置文件。

2025-10-17 16:11:53 271

原创 @RequiredArgsConstructor使用

在写具体逻辑时候,比如service层,我们可能需要注入很多的repository或者mapper接口,用注解@Autowired的话,每个都需要加注解,除此外还有一些缺点。在现代Spring(特别是Spring 4.3及以上版本)中,官方推荐使用基于构造器的注入,这种方式也使得代码冗长。lombok提供了一个注解: @RequiredArgsConstructor(基于构造器注入)并且,在这个生成的构造函数上,加上 @Autowired 注解。这样一个注解就替代了多个字段的构造函数声明,非常干净。

2025-10-11 10:20:20 141

原创 java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String

原因:对于时间参数进行比较时, 如果拿传入的时间类型参数与空字符串"''进行对比判断,则会报错。修改:只比较是否为null就好了。

2025-03-21 14:22:15 242

原创 io.seata.common.exception.ShouldNeverHappenException: Could not found any index in the table

报错:io.seata.common.exception.ShouldNeverHappenException: Could not found any index in the table。原因:缺少主键或唯一索引,Seata 需要一个主键或唯一索引来确保数据的一致性和唯一性。同时也就有了主键索引通过sql语句可以查到。解决方法:检查并添加主键或唯一索引。

2025-01-08 15:49:10 429 1

原创 IDEA快捷键生成serialVersionUID

2、打开Settings->Editor->Inspections->Java->JVM languages里找到,勾选然后应用即可。或者直接搜索serializable class without ‘serialVersionUID’也。可以找到,勾选然后应用即可。3.然后鼠标放在类名上,AIt+Enter即可。1、首先类要实现Serializable接口。

2024-05-10 10:41:03 1503 1

原创 新建一个springboot项目报错

错误的类文件: /D:/Repository/org/springframework/boot/spring-boot/3.0.5/spring-boot-3.0.5.jar!/org/springframework/boot/SpringApplication.class 类文件具有错误的版本 61.0, 应为 52.0。2.IDEA形式,勾选"Always update snapshots",然后再用Maven / Reimport来更新依赖。

2023-08-10 14:41:30 1514 1

原创 Failed to convert value of type ‘java.lang.String‘ to required type ‘java.lang.Long‘; nested excepti

Failed to convert value of type 'java.lang.String' to required type 'java.lang.Long'; nested exception is java.lang.NumberFormatException: For input string: "export-order"

2023-05-21 16:52:36 1910 1

原创 idea报command line is too long

idea报command line is too long

2023-04-18 20:01:20 180

原创 These dependencies were not found: swiper/swiper-bundle.css

These dependencies were not found:swiper/swiper-bundle.css

2023-02-01 14:56:22 2370

原创 window安装elasticsearch 7.3.0以及ik分词器

window安装elasticsearch7.3.0以及ik分词器

2023-01-26 13:39:16 1303

原创 MySQL报错:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘xx

MySQL报错“Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre”解决方法

2022-11-25 11:08:38 763

原创 centos7上安装docker

centos7上安装docker

2022-11-01 11:34:30 140

原创 Linux安装

VMware 与linux安装

2022-10-24 15:00:08 130

原创 com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

**com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

2022-09-07 20:47:26 821 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除