随笔分类 -  java / springboot

springboot框架内容
摘要:可以在service中添加@lazy(true) 实测有效。例如: public class AService{ @Autowired @Lazy(true) private BService bService; } public class BService{ @Autowired @Lazy(t 阅读全文
posted @ 2024-02-01 17:39 盘思动 阅读(59) 评论(0) 推荐(0) 编辑
摘要:![](https://img2024.cnblogs.com/blog/1202393/202402/1202393-20240201173746660-1669565149.png) 阅读全文
posted @ 2024-02-01 17:37 盘思动 阅读(171) 评论(0) 推荐(0) 编辑
摘要:您可以在 MyBatis 的查询方法中,使用 COUNT 函数查询指定数据是否存在。如果 COUNT 的返回值为 0,表示数据不存在,反之则存在。 以下是一个示例: <select id="dataExists" resultType="boolean"> SELECT COUNT(*) > 0 A 阅读全文
posted @ 2024-01-30 15:04 盘思动 阅读(1702) 评论(0) 推荐(0) 编辑
摘要:一、SpringBoot获取项目路径 在使用SpringBoot时,我们可能需要获取当前项目的路径,可以使用以下代码来获取: String projectPath = System.getProperty("user.dir"); System.out.println("项目路径:" + proje 阅读全文
posted @ 2024-01-26 17:00 盘思动 阅读(6524) 评论(0) 推荐(2) 编辑
摘要:然后配置maven打包插件的系统范围 <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2 阅读全文
posted @ 2024-01-25 15:31 盘思动 阅读(250) 评论(0) 推荐(0) 编辑
摘要:因为项目需求,对接第三方sdk,其需要项目启动就启动另外一个端口来监听接收数据,故需要main中调用service,才好跟数据库交互; @SpringBootApplication public class DromaraApplication { @Autowired private static 阅读全文
posted @ 2024-01-25 15:22 盘思动 阅读(70) 评论(0) 推荐(0) 编辑
摘要:若依原本的swagger实在是丑,找了方法实现了增强优化 若依集成knife4j实现swagger文档增强 本期全是干货,这里我就当你用的非常熟练了,在ruoyi-admin模块中pom文件里加入以下依赖 注:引用knife4j-spring-boot-starter依赖,项目中的swagger依赖 阅读全文
posted @ 2024-01-18 14:39 盘思动 阅读(866) 评论(0) 推荐(0) 编辑
摘要:涉及无限极分类实现 ProductExcel.java package io.renren.modules.product.excel; import cn.afterturn.easypoi.excel.annotation.Excel; import io.renren.modules.prod 阅读全文
posted @ 2023-12-05 15:15 盘思动 阅读(604) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/qq_34412985/article/details/115248772 阅读全文
posted @ 2023-12-04 19:30 盘思动 阅读(62) 评论(0) 推荐(0) 编辑
摘要:@Excel(name="商品编号") private String productCode; public String getProductCode(){// 过滤空格; return productCode.trim(); } 阅读全文
posted @ 2023-11-14 16:44 盘思动 阅读(109) 评论(0) 推荐(0) 编辑
摘要:* 名称是selectOne,但有多条数据满足条件的时候,会返回多条数据。 * 解决方法: 加上`.last("limit 1")` ``` String todayStart = DateUtils.getTodayStartTime(); String todayEnd = DateUtils. 阅读全文
posted @ 2023-07-14 18:57 盘思动 阅读(449) 评论(0) 推荐(0) 编辑
摘要:* 我的代码片段 ``` String numberCode = (String) params.get("numberCode"); if(StringUtils.isNotBlank(numberCode)){ wrapper.and(qw -> qw.eq("number", numberCo 阅读全文
posted @ 2023-07-13 19:13 盘思动 阅读(794) 评论(0) 推荐(0) 编辑
摘要:项目打包 命令记录 ``` 打包前配置maven/admin模块需配置的命令: clean package -pl renren-admin -am -amd 本地打包后:renren-admin/target/pos-admin.jar 生成这个文件 /project/server/pos/pos 阅读全文
posted @ 2023-06-29 11:56 盘思动 阅读(77) 评论(0) 推荐(0) 编辑
摘要:* SpringBoot框架中的Entity,DAO,Service,Controller层的关系 ![](https://img2023.cnblogs.com/blog/1202393/202306/1202393-20230621111317899-379968088.png) ![](htt 阅读全文
posted @ 2023-06-21 10:21 盘思动 阅读(179) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示