sunny123456

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2023年12月6日

摘要: 解决:Command line is too long. Shorten command line for xxx or also for Application default configurat 解决:Error running 'xxx': Command line is too long. 阅读全文
posted @ 2023-12-06 19:53 sunny123456 阅读(36) 评论(0) 推荐(0) 编辑

摘要: Command line is too long. Shorten command line for xxx or also for Spring Boot default configuration 主要是命令行太长了,导致项目启动不成功 目录 一、情景再现: 二、分析原因: 三、解决方法: 1、 阅读全文
posted @ 2023-12-06 19:52 sunny123456 阅读(197) 评论(0) 推荐(0) 编辑

摘要: @RunWith注解找不到,怎么办?spring-boot-starter-test 2.5.5 版本只需要在类上加上@SpringBootTest即可方法上加@Test,不需要再加@RunWith()注解了。 1、新版spring-boot-starter-test不再集成junit,而是juni 阅读全文
posted @ 2023-12-06 19:50 sunny123456 阅读(388) 评论(0) 推荐(0) 编辑

摘要: @SpringBootTest 和 @RunWith 注解不能识别 单元测试第一步引入maven依赖 一、背景 最近在预研 Rocketmq,在写小例子的时候,需要编写测试代码,突然间发现我的 @SpringBootTest 和 @RunWith 这两个注解不能识别,于是展开了我的问题排查过程。问题 阅读全文
posted @ 2023-12-06 19:46 sunny123456 阅读(250) 评论(0) 推荐(0) 编辑

摘要: java 序列话注解 @Transient Java 序列化注解及其使用 简介 在 Java 程序中,对象的序列化是指将对象转换为字节流的过程,以便在网络上传输或保存到文件中。而反序列化则是将字节流重新转换为对象。 Java 提供了 java.io.Serializable 接口,用于标识可序列化的 阅读全文
posted @ 2023-12-06 19:44 sunny123456 阅读(234) 评论(0) 推荐(0) 编辑

摘要: java中的关键字transient,将不需要序列化的属性前添加关键字transient,序列化对象的时候,这个属性就不会被序列化 这个关键字的作用其实我在写java的序列化机制中曾经写过,不过那时候只是简单地认识,只要其简单的用法,没有深入的去分析。这篇文章就是去深入分析一下transient关键 阅读全文
posted @ 2023-12-06 19:39 sunny123456 阅读(9) 评论(0) 推荐(0) 编辑