- 博客(25)
- 收藏
- 关注
原创 seaborn 找不到 stat_func
问题: ‘PathCollection’ object has no property ‘stat_func’This functionality was deprecated in Seaborn v0.9.0 (July 2018):此功能在 Seaborn v0.9.0(2018 年 7 月)中已弃用解决方式:如果需要此功能,请重新安装低版本的seaborn如果不明白请跳转社区:https://stackoverflow.com/questions/52118245/python-seab
2022-05-03 14:47:44
802
原创 数据库表生成实体类包含注释
1、先连接数据库import com.intellij.database.model.DasTableimport com.intellij.database.model.ObjectKindimport com.intellij.database.util.Caseimport com.intellij.database.util.DasUtilimport java.io.*import java.text.SimpleDateFormat/* * Available cont
2021-10-04 14:39:15
633
原创 mybaties标签
select<select id="userList" parameterType="user" resultType="User"> select * from user where name =#{name} </select>insert<insert id="insertUser" parameterType="int"> insert into user (id) values (#{id}) .
2021-09-18 16:19:49
208
原创 多线程分段处理批量数据
import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Component;import java.util.ArrayList;import java.util.List;import java.util.Map;import java.util.concurrent.*;impor
2021-07-22 13:47:50
863
原创 redis锁操作
服务类自动生成器import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;import com.baomidou.mybatisplus.generator.AutoGenerator;import com.baomidou.mybatisplus.generator.InjectionConfig;import com.baomidou.mybatisplus.generator.config.*;import
2020-09-24 17:27:38
268
原创 mysql创建表-包括多种类型数据及索引
drop table if exists tt_info;CREATE TABLE `tt_info` ( `tt_info_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id(自增主键)', `tt_info_serial_no` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '交易号', `serial_no` varchar(40) CHAR.
2020-09-04 16:33:43
389
原创 数据库业务代码随机生成
import java.util.Random;/** * @Description * @Author * @Date 2020/8/27 17:08 */public class GenBusinessCode { /** * 生成业务码。前缀加16位随机数 * @param key 对应业务码前缀 * @return 业务码 +16位随机数 */ public static String generatorByRandom(S.
2020-09-04 15:34:31
203
原创 系统异常检测
import com.xx.xx.web.base.views.ResponseVo;import org.springframework.web.bind.annotation.ExceptionHandler;import org.springframework.web.bind.annotation.ResponseBody;import java.util.HashMap;import java.util.Map;/** * 系统异常响应接口类 * * 2020/3/13 .
2020-08-04 17:11:55
376
原创 CopyUtils封装一下BeanUtils的copy方法
package com.alibaba.test.service;import org.springframework.beans.BeanUtils;import org.springframework.beans.BeanWrapper;import org.springframework.beans.BeanWrapperImpl;import java.util.HashSet;import java.util.Set;/** * 复制数据,去除空数据 * jar: or.
2020-07-28 10:38:35
982
原创 MybatisPlusConfig
import com.baomidou.mybatisplus.annotation.DbType;import com.baomidou.mybatisplus.annotation.FieldStrategy;import com.baomidou.mybatisplus.annotation.IdType;import com.baomidou.mybatisplus.core.MybatisConfiguration;import com.baomidou.mybatisplus.core.
2020-07-22 13:46:32
7391
2
原创 Excel 匹配模板处理工具
import com.alibaba.fastjson.JSONObject;import lombok.Getter;import lombok.Setter;import lombok.extern.slf4j.Slf4j;import org.apache.poi.ss.usermodel.*;import org.apache.poi.ss.util.CellRangeAddress;import org.springframework.util.CollectionUtils;i.
2020-07-20 15:35:43
401
原创 Excel转PDF
import com.aspose.cells.*;import com.aspose.cells.PdfSaveOptions;import com.itextpdf.text.*;import com.itextpdf.text.pdf.*;import lombok.extern.slf4j.Slf4j;import java.io.*;/** * jar * 1: aspose-cells-20.6.jar * 2: itextpdf-5.5.1.jar * 3: lomb.
2020-07-03 15:56:46
379
原创 异步处理+重试机制
package com.olc.ejdemo.config;import lombok.extern.slf4j.Slf4j;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.context.annotation.Primary;import org.springfram.
2020-06-02 16:32:33
1366
1
原创 通过bean注入的方式实现系统初始化properties配置
import lombok.Getter;import lombok.Setter;import lombok.experimental.Accessors;import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.InitializingBean;import org.springframework.boot.context.properties.ConfigurationProperties;impor
2020-05-13 10:02:07
398
原创 线程异步操作
import org.slf4j.MDC;import org.springframework.core.task.TaskDecorator;import java.util.Map;/** */public class MdcTaskDecorator implements TaskDecorator { /** * 使异步线程池获得主线程的上下文 ...
2020-05-08 10:01:53
368
原创 linux..ftp上传下载删除
import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.InputStream;import java.io.OutputStream;import java.util.Arrays;import java.util.HashMap;impor...
2020-04-29 10:27:05
398
1
原创 使用Spock框架进行单元测试
https://blog.youkuaiyun.com/u012279452/article/details/50523943
2020-03-12 13:53:09
234
原创 类型转换错误-PropertyUtils.copyProperties()转换为空时
model的类有这个注解时,直接用PropertyUtils.copyProperties方法进行转换会转换失败这时候有两种解决方式方式一:去掉@Accessors注解继续用PropertyUtils.copyProperties(target,source)方式二:用另一个类转换BeanUtils.copyProperties(source,target)...
2020-02-28 15:13:11
713
原创 记录数据库连接错误
‘url’ attribute is not specified and no embedded datasource could be configured.去掉primary之后项目启动成功
2020-02-28 10:56:22
308
1
原创 freemaker加载自定义变量
freemaker实现自定义变量public String jsonTranslateHtml(String json, String templateNo, String watermark, FreemakerHandler handler) throws Exception { //TODO method 获取fileName Sao TemplateDetail te...
2020-01-14 09:21:37
251
转载 zk原理剖析
https://blog.youkuaiyun.com/suchahaerkang/article/details/84141770
2019-10-05 12:16:20
328
1
原创 MySQL优化
1.执行计划explain从执行计划查看是否需要优化sql2.关键字段1.id – 表的执行顺序,id大的先执行,相同的时候从上往下执行;2.type - 一般出现eq-ref 就已经可以了,因为再往上就是system和null,这两个是几乎不会出现的类型;如果是all的话基本上都需要优化;3.param-keys – 可以用到的索引;4.key – 使用的索引;5.rows – 大...
2019-09-22 23:28:51
194
原创 IOC和AOP的简单原理
IOC:控制反转,是一种编程思想,Spring是实现了这个思想的一套框架。将对象的创建权利反转给第三方容器(Spring的bean容器),这样做能降低类与类之间的耦合;耦合:假设A类和B类,如果直接在A类中new一个B类的对象,称之为硬编码耦合。解耦就是要消除这种耦合性,因为硬编码耦合的程序会有一定的问题,假如B类的构造形式发生了变化,就必须要修改A类。class A{ B b = new...
2019-09-08 23:40:22
922
原创 RabbitMQ
一、交换机类型fanout/direct/topic/header二、常用的方法详解1、exchangeDeclare 交换机的声明exchange:交换机名称;type:交换机类型;durable:是否为持久型交换机,true为是/false为否;持久型交换机:rabbimq服务关闭后不会被自动删除;非持久型交换机:rabbitmq服务关闭后,就会被自动删除;autoDelete:...
2019-09-08 23:08:40
291
原创 Redis非关系型数据库
一、Redis的事务管理Redis的事务管理是基于乐观锁实现的,主要是为了保证事务的一致性;一旦开启事务后,Redis的所有命令都会进入到一个queue,只有commit,才会依次执行队列中的命令;事务必须在一个连接(Connection)中执行,通常Spring中会使用SessionCallback接口进行处理;二、Redis的超时命令Redis是基于内存存储数据的,所以Redis的数据存...
2019-09-08 21:18:47
270
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人