随笔分类 -  SpringBoot2.x

摘要:1. 背景介绍 在开发过程中,我们经常会遇到往数据库表中插入大量数据的场景,比如excel批量导入数据。那么该如何快速地插入数据呢? 我们可以考虑使用批量插入来实现,实测100000条数据添加,后附具体实现代码。 2. 方案介绍 2.1 第一种方案,用 for语句循环插入(不推荐) 用一个 for 阅读全文
posted @ 2024-11-04 17:46 哩个啷个波 阅读(3333) 评论(0) 推荐(0)
摘要:目录简介:StopWatch 类的应用场景:StopWatch 类提供了以下一些主要方法:start():stop():reset():split():unsplit():getTime():getStartTime():toString():isStarted():isStopped():示例代码 阅读全文
posted @ 2024-11-04 17:45 哩个啷个波 阅读(502) 评论(0) 推荐(0)
摘要:1.问题描述: 之前用spring MVC,转成spring boot之后发现上传不能用。网上参考说是spring boot已经有CommonsMultipartResolver了,但是我的上传后台接收的还是null。 2.解决方法 加入配置类 import org.springframework. 阅读全文
posted @ 2023-09-24 09:54 哩个啷个波 阅读(839) 评论(0) 推荐(0)
摘要:在使用Swagger的时候访问地址后出现了错误,`http://localhost:8001/swagger-ui.html` 一直在弹窗提示,还取消不了 ![image-20230813164309945](https://img2023.cnblogs.com/blog/2446184/2023 阅读全文
posted @ 2023-08-13 16:56 哩个啷个波 阅读(3277) 评论(0) 推荐(0)
摘要:## 一、报错信息 org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.l 阅读全文
posted @ 2023-08-13 16:35 哩个啷个波 阅读(3743) 评论(0) 推荐(0)
摘要:报错提示内容: 解决:将启动类文件移动到com.atguigu.eduservice包。应该是EduApplication.java文件自带的@SpringBootApplication中包含@ComponentScan,默认是扫描该类所在的包和子包的,即 @ComponentScan(basePa 阅读全文
posted @ 2023-08-13 15:32 哩个啷个波 阅读(734) 评论(0) 推荐(0)
摘要:1、原因这是由于两个版本不一致导致的; <!--mybatis-plus--> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.5.1 阅读全文
posted @ 2023-08-13 11:26 哩个啷个波 阅读(481) 评论(0) 推荐(0)
摘要:### 一、热部署/热加载 **热部署(Hot Deploy):** 热部署针对的是容器或者是整个应用,部署了新的资源或者修改了一些代码,需要在不停机的情况下的重新加载整个应用。 **热加载(Hot Swap):** 热加载针对的是单个[字节码](https://so.csdn.net/so/sea 阅读全文
posted @ 2023-06-22 20:55 哩个啷个波 阅读(277) 评论(0) 推荐(0)
摘要:生产环境用户的隐私数据,比如手机号、身份证或者一些账号配置等信息,入库时都要进行不落地脱敏,也就是在进入我们系统时就要实时的脱敏处理。 用户数据进入系统,脱敏处理后持久化到数据库,用户查询数据时还要进行反向解密。这种场景一般需要全局处理,那么用`AOP`切面来实现在适合不过了。首先自定义两个注解`@ 阅读全文
posted @ 2023-06-22 20:42 哩个啷个波 阅读(364) 评论(0) 推荐(0)
摘要:**一SpringBoot2.0.4集成SpringCloud异常:** `org.springframework.boot.builder.SpringApplicationBuilder.([Ljava/lang/Object;)V` **二、异常处理参考:** **缘起** 初学spring 阅读全文
posted @ 2023-06-22 20:19 哩个啷个波 阅读(529) 评论(0) 推荐(0)
摘要:# 直接上代码 ```java @Service public class XXXService { // 这两个必须要注入 @Resource DataSourceTransactionManager dataSourceTransactionManager; @Resource Transact 阅读全文
posted @ 2023-06-22 19:44 哩个啷个波 阅读(1521) 评论(0) 推荐(0)
摘要:原因是导入了jdbc的依赖,使用@Configuration注解向spring注入了dataSource bean。 但是因为工程中没有关于dataSource相关的配置信息,当spring创建dataSource bean因缺少相关的信息就会报错。 有两个办法: 办法1: 去除spring-boo 阅读全文
posted @ 2023-05-05 22:27 哩个啷个波 阅读(1047) 评论(0) 推荐(1)
摘要:1、问题 运行Spring Boot项目,发生java.lang.IllegalArgumentException异常,原因如下: ContextPath must start with '/' and not end with '/' 完整的Run输出如下: . ____ _ __ _ _ /\\ 阅读全文
posted @ 2023-04-25 14:05 哩个啷个波 阅读(677) 评论(0) 推荐(0)
摘要:错误信息: com.xubo.rabbitmq.springbootrabbitmq.SpringbootRabbitmqApplication . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | 阅读全文
posted @ 2023-04-06 22:29 哩个啷个波 阅读(1149) 评论(0) 推荐(0)
摘要:报错: Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException错误 项目版本: springboot最新版本 <parent> <group 阅读全文
posted @ 2023-04-05 21:25 哩个啷个波 阅读(262) 评论(0) 推荐(0)
摘要:##报错信息: `APPLICATION FAILED TO START Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could 阅读全文
posted @ 2022-12-26 21:39 哩个啷个波 阅读(81) 评论(0) 推荐(0)
摘要:报错完整信息:This application has no explicit mapping for /error, so you are seeing this as a fallback 翻阅了网上众多资料,主要有三种解决的方向: 方向1: Application启动类的位置不对.要将Appl 阅读全文
posted @ 2022-12-06 08:12 哩个啷个波 阅读(609) 评论(0) 推荐(0)
摘要:报错信息: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.xubo.mybatisplus.MyBatisPlusTest': Unsatisf 阅读全文
posted @ 2022-12-01 21:17 哩个啷个波 阅读(1119) 评论(0) 推荐(0)
摘要:参考声明:https://blog.csdn.net/zzhongcy/article/details/124488799 1.错误现象 最近升级Springboot 2.6.2到Springboot 2.6.7, mysql版本: mysql-5.7.27 DB配置: spring.datasou 阅读全文
posted @ 2022-11-06 16:10 哩个啷个波 阅读(1703) 评论(0) 推荐(0)
摘要:参考声明:https://www.cnblogs.com/melodyjerry/p/14357630.html 参考声明:https://www.cnblogs.com/flower-dance/p/14267042.html @RestController @RestController注解,相 阅读全文
posted @ 2022-11-06 15:53 哩个啷个波 阅读(6081) 评论(0) 推荐(0)