随笔分类 - SpringBoot2.x
摘要:1. 背景介绍 在开发过程中,我们经常会遇到往数据库表中插入大量数据的场景,比如excel批量导入数据。那么该如何快速地插入数据呢? 我们可以考虑使用批量插入来实现,实测100000条数据添加,后附具体实现代码。 2. 方案介绍 2.1 第一种方案,用 for语句循环插入(不推荐) 用一个 for 
        阅读全文
                
摘要:目录简介:StopWatch 类的应用场景:StopWatch 类提供了以下一些主要方法:start():stop():reset():split():unsplit():getTime():getStartTime():toString():isStarted():isStopped():示例代码
        阅读全文
                
摘要:1.问题描述: 之前用spring MVC,转成spring boot之后发现上传不能用。网上参考说是spring boot已经有CommonsMultipartResolver了,但是我的上传后台接收的还是null。 2.解决方法 加入配置类 import org.springframework.
        阅读全文
                
摘要:在使用Swagger的时候访问地址后出现了错误,`http://localhost:8001/swagger-ui.html` 一直在弹窗提示,还取消不了 :** 热部署针对的是容器或者是整个应用,部署了新的资源或者修改了一些代码,需要在不停机的情况下的重新加载整个应用。 **热加载(Hot Swap):** 热加载针对的是单个[字节码](https://so.csdn.net/so/sea
        阅读全文
                
摘要:生产环境用户的隐私数据,比如手机号、身份证或者一些账号配置等信息,入库时都要进行不落地脱敏,也就是在进入我们系统时就要实时的脱敏处理。 用户数据进入系统,脱敏处理后持久化到数据库,用户查询数据时还要进行反向解密。这种场景一般需要全局处理,那么用`AOP`切面来实现在适合不过了。首先自定义两个注解`@
        阅读全文
                
摘要:**一SpringBoot2.0.4集成SpringCloud异常:** `org.springframework.boot.builder.SpringApplicationBuilder.([Ljava/lang/Object;)V` **二、异常处理参考:** **缘起** 初学spring 
        阅读全文
                
摘要:# 直接上代码 ```java @Service public class XXXService { // 这两个必须要注入 @Resource DataSourceTransactionManager dataSourceTransactionManager; @Resource Transact
        阅读全文
                
摘要:原因是导入了jdbc的依赖,使用@Configuration注解向spring注入了dataSource bean。 但是因为工程中没有关于dataSource相关的配置信息,当spring创建dataSource bean因缺少相关的信息就会报错。 有两个办法: 办法1: 去除spring-boo
        阅读全文
                
摘要:1、问题 运行Spring Boot项目,发生java.lang.IllegalArgumentException异常,原因如下: ContextPath must start with '/' and not end with '/' 完整的Run输出如下: . ____ _ __ _ _ /\\
        阅读全文
                
摘要:错误信息: com.xubo.rabbitmq.springbootrabbitmq.SpringbootRabbitmqApplication . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| |
        阅读全文
                
摘要:报错: Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException错误 项目版本: springboot最新版本 <parent> <group
        阅读全文
                
摘要:##报错信息: `APPLICATION FAILED TO START Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could 
        阅读全文
                
摘要:报错完整信息:This application has no explicit mapping for /error, so you are seeing this as a fallback 翻阅了网上众多资料,主要有三种解决的方向: 方向1: Application启动类的位置不对.要将Appl
        阅读全文
                
摘要:报错信息: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.xubo.mybatisplus.MyBatisPlusTest': Unsatisf
        阅读全文
                
摘要:参考声明: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
        阅读全文
                
摘要:参考声明:https://www.cnblogs.com/melodyjerry/p/14357630.html 参考声明:https://www.cnblogs.com/flower-dance/p/14267042.html @RestController @RestController注解,相
        阅读全文
                

 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号