
【沉浸式解决问题】
文章平均质量分 83
沉浸式带你学习解决问题的过程,不但解决了问题,在解决问题方法上也会有所收获
荔枝吻
完美主义架构师,欢迎关注【保姆级喂饭教程】等系列。
展开
-
【沉浸式解决问题】基于泛型递归,Java中实体类基类开启MybatisPlus的ActiveRecord模式
MybatisPlus的ActiveRecord模式对本地数据处理项目十分的便捷,同时为了更好的管理公共字段,又引入了BaseEntity作为基类,包括创建时间、创建者、更新时间、更新者等字段,之后所有的实体类再继承基类,但是这样实体类就无法再使用MybatisPlus的Model类提供的数据库操作方法了,想到了通过泛型递归来解决。原创 2025-05-26 16:35:31 · 899 阅读 · 0 评论 -
【沉浸式解决问题】Generating equals/hashCode implementation but without a call to superclass, even though...
在实体类上使用了Lombok的@Data注解后,idea爆黄色警告,虽然不影响使用,但还是解决一下,警告如下:Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '(callSuper=false)' to your type.原创 2025-05-23 16:26:34 · 578 阅读 · 0 评论 -
【沉浸式解决问题】System.getProperty(“user.dir“)获取不到项目根目录
在微服务项目中使用System.getProperty("user.dir")获取不到父工程项目根目录,获取到的是当前子模块目录。原创 2025-05-22 19:30:04 · 398 阅读 · 0 评论 -
【沉浸式解决问题】Caused by: java.lang.ClassNotFoundException: freemarker.template.Configuration
在使用Mybatis-Plus的代码生成器时报错: Caused by: java.lang.ClassNotFoundException: freemarker.template.Configuration原创 2025-05-21 20:55:18 · 333 阅读 · 0 评论 -
【沉浸式解决问题】Cannot resolve symbol ‘NotNull‘
查看mybatis-plus代码生成器源码时发现@NotNull注解爆红,但是参数等地方经常用,按理说应该有依赖,拉到最上面查看类发现是jetbrains的。顺便拓展一下Java Bean Validation相关知识。原创 2025-05-20 14:18:02 · 675 阅读 · 0 评论 -
【沉浸式解决问题】com.baomidou.mybatisplus.*.exceptions.MybatisPlusException: *.Test Not Found TableInfoCache
配置了entity和mapper的类以后使用ActiveRecord模式进行查询测试,错误如下:> com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: com.gwyy.ybws.common.core.entity.Test Not Found TableInfoCache.原创 2025-05-13 20:47:04 · 1048 阅读 · 0 评论 -
【沉浸式解决问题】No qualifying bean of type ‘javax.sql.DataSource‘ available: expected at least 1 bean which
最近重新创建项目,在配置数据库进行连接测试时犯了十分低级的错误,特此记录一下。> 具体错误是:Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.sql.DataSource' available: expected at least 1 bean which qualifies as autowire candidate.原创 2025-05-12 18:38:20 · 1547 阅读 · 0 评论 -
【沉浸式解决问题】java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use
在spring cloud项目中使用@SpringBootTest注解进行单元测试时,报如下错误java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test原创 2025-05-09 16:30:27 · 578 阅读 · 0 评论 -
【沉浸式解决问题】idea创建spring boot项目打不开“https://start.spring.io“
idea创建spring boot项目时打不开"https://start.spring.io",报错Error message:Cannot download ‘https://start.spring.io’: Connection refused: connect。原创 2025-04-03 17:06:24 · 391 阅读 · 0 评论 -
【沉浸式解决问题】通过GitLab API批量创建删除用户和项目
之前发了一篇GitLab被恶意注册,所以关闭注册功能,被恶意创建了很多用户和项目,当时未找到批量删除的方法,后续操作用户和项目实在是不方便,得找半天,通过搜索,找到了可以通过GitLab API批量创建删除用户和项目。原创 2025-03-28 14:17:26 · 989 阅读 · 0 评论