自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(55)
  • 收藏
  • 关注

原创 SpringBoot集成redisson实现延时队列

SpringBoot集成redisson实现延时队列

2022-08-16 20:37:53 1090 3

原创 npm i -g yarn安装yarn失败

npm i -g yarn安装yarn失败

2022-08-07 18:39:03 1078 1

原创 基于华为云服务器Docker nginx安装和配置挂载

基于华为云服务器Docker nginx安装和配置挂载

2022-07-21 10:55:45 1319

原创 基于华为云服务器docker配置Elasticsearch集群

基于华为云服务器docker配置Elasticsearch集群

2022-07-20 15:19:57 656

原创 docker配置minio

docker配置minio

2022-07-19 16:16:01 884

原创 华为云服务器CentOS 8.2 安装docker

华为云服务器CentOS 8.2 安装docker

2022-07-19 15:50:55 754

原创 easyexcel填充

https://alibaba-easyexcel.github.io/quickstart/faq.html{name}可以对象,map形式填充,{.name}集合形式填充结果:

2022-01-14 10:49:27 467

原创 异步处理的几种方式

1.CompletableFuture.supplyAsync异步public static CompletableFuture supplyAsync(Supplier supplier)public static CompletableFuture supplyAsync(Supplier supplier, Executor executor)Executor executor可做参数自定义线程数ExecutorService executor = Executors.newFixedTh

2022-01-04 13:53:04 4140

原创 AOP练习

这里是引用https://blog.csdn.net/q982151756/article/details/80513340AOP的基本概念然后举一个容易理解的例子:看完了上面的理论部分知识, 我相信还是会有不少朋友感觉到 AOP 的概念还是很模糊, 对 AOP 中的各种概念理解的还不是很透彻. 其实这很正常, 因为 AOP 中的概念是在是太多了, 我当时也是花了老大劲才梳理清楚的.下面我以一个简单的例子来比喻一下 AOP 中 Aspect, Joint point, Pointcut 与 Ad.

2022-01-04 11:00:50 256

原创 Linux服务器上部署mongodb再增加登录密码

1.先下个mongodb的linux包官网:https://www.mongodb.com/try/download/community链接:https://pan.baidu.com/s/1crXs0XHO5FGVEoT5TgvCWw 提取码:owy8 2.下来解压tar -zxvf mongodb-linux-x86_64-4.0.13.tgz3.移动到mv mongodb-linux-x86_64-4.0.13 /usr/local/src/Mongodb4.新建data和logs

2021-12-13 18:02:27 846

原创 linux安装mysql数据库

1.下载mysql先检查看有没有mysqlrpm -qa | grep mysql如果存在,删除即可,-e后边需要rpm -qa | grep mysql查看出的全部名称rpm -e mysql-libs-5.1.73-8.el6_8.x86_64 //普通删除模式,mysql名称要写全,和上面查到的名称一致开始下载yum install -y mysql-server mysql mysql-devel设置开机启动mysql systemctl enable mysqld.serv

2021-12-08 17:35:28 503

原创 1130 - Host xx.xx.xx.xx is not allowed to connect to this MySQL server

1130 - Host xx.xx.xx.xx is not allowed to connect to this MySQL server原因:mysql数据库远程连接不上。解决:服务器上:mysql -uroot -puse mysql;select host from user where user = 'root';将Host设置为通配符%Host列指定了允许用户登录所使用的IP,比如user=root Host=192.168.1.1。这里的意思就是说root用户只

2021-12-08 17:18:58 85

原创 序列化与反序列化版本冲突: stream classdesc serialVersionUID = 540, local class serialVersionUID = 550

java.io.InvalidClassException: org.springframework.security.core.authority.SimpleGrantedAuthority; local class incompatible: stream classdesc serialVersionUID = 540, local class serialVersionUID = 550原因:SpringSecurity不支持跨版本的序列化 可能是redis缓存有其他版本的Security版本

2021-12-08 13:55:14 2574

原创 available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations:

1.报错信息:Error creating bean with name 'braceletAlarmController': Unsatisfied dependency expressed through field 'tblBraceletAlarmService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name '

2021-11-29 15:33:01 1319

原创 postgres数据库根据身份证查询省市区人数总和

1.省区市表(后有百度云链接,数据也是最新)链接:https://pan.baidu.com/s/1KYcglR0X3w9mmnMM8z0aGA提取码:v10o2.再用你需要的身份证号的表联查就好,sql奉上:concat(SUBSTR(t.身份证号, 1,2),‘0000’)里的12位是省后边补四个零对应省的编码1到4就是市后边补两个零,1到6就是准确的县区,不用补位SELECT count(t.身份证号),tt.ttFROM 带身份证号的表 t LEFT JOIN t_area tt

2021-11-22 14:25:19 988

原创 SQL 查询一个字段所有的之出现次数大于1的条数

select count(name) ,name from user group by name having count(name)>1

2021-11-22 14:01:54 5624

原创 mybatis-plus自动填充时间

1.设置配置类@Component@Primary@Slf4jpublic class MyMetaObjectHandler implements MetaObjectHandler { @Override public void insertFill(MetaObject metaObject) { log.debug("start insert fill ...."); this.setFieldValByName("createTime",

2021-11-08 15:24:14 286

原创 mongodb使用包含分页查询过滤多样性方法

1.配置yaml文件mongodb://127.0.0.1:27017/pengyuyan中的pengyuyan是数据库名称2.分页类SpringDataPageableimport org.springframework.data.domain.Pageable;import org.springframework.data.domain.Sort;import java.io.Serializable;public class SpringDataPageable implements

2021-11-04 17:05:49 395

原创 java异步调用方法

1.CompletableFuture使用原生的CompletableFuture实现异步操作,加上对lambda的支持,可以说实现异步任务已经发挥到了极致。@Testpublic void test2() throws Exception {System.out.println(“main函数开始执行”);ExecutorService executor = Executors.newFixedThreadPool(2);CompletableFuture future = Completab

2021-11-01 21:35:16 3069 1

原创 多数据源mybatis-plu使用

1.导入依赖<dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot-starter</artifactId> <version>3.1.0</version> </dependency>2.配置数据源依

2021-11-01 17:13:13 102

原创 mybatis-plus自定义page分页

//获取集合然后过滤 List<FilesVO> filesVOS = filesService.fileShowPage2(query); Iterator<FilesVO> iterator = filesVOS.iterator(); //下边是业务需要的过滤操作 while (iterator.hasNext()) { FilesVO next = iterator.next(); if (!data) { //说明没权限 //非公

2021-10-20 21:41:24 1379

原创 【Exception】Spring报错:Bean with name ‘xxx‘ has been injected into other beans [xxx] in its raw version

1.报错内容:Error creating bean with name ‘metaTableColumnsServiceImpl’: Bean with name ‘metaTableColumnsServiceImpl’ has been injected into other beans [metaTableServiceImpl] in its raw version as part of a circular reference, but has eventually been wrapped.

2021-10-17 15:47:13 1790

原创 IDEA 多模块项目 改变module名字后启动找不到主类

发现module编译后 target中没有classes解决方法 将module中的xx.iml文件打开,里面会有旧的module名 改为新的 重新编译即可这个地方的名字改的跟新模块名一致就行,再次运行就好使

2021-10-12 15:28:26 1007

原创 java8 stream小实例

import lombok.AllArgsConstructor;import lombok.Data;@Data@AllArgsConstructorpublic class Person { String userName; double gongzi; int age; int sex;}import org.checkerframework.checker.units.qual.C;import java.util.*;import jav

2021-09-25 15:03:59 221

原创 java浏览器上传图片转base64

@PostMapping("/upload") public R upload(@RequestParam(value = "filename") MultipartFile file) throws Exception { String fileName = file.getOriginalFilename(); // 将图片文件转化为二进制流 InputStream in = null; byte[] data = null; in = file.getInputStream();

2021-09-24 15:38:26 166

原创 minio在linux服务器部署过程

1.先下载到服务器上wget https://dl.min.io/server/minio/release/linux-amd64/minio2.权限chmod +x minio3.运行./minio server /usr/software/minio/data会出现两个警告,有警告的时候会影响启动运行WARNING: Console endpoint is listening on a dynamic port (33577), please use --console-address

2021-09-15 14:50:58 2641

原创 Feign之间调用的参数传递问题(@RequestBody 和@RequestParam)

SpringCloud Feign报错:java.lang.IllegalStateException: Method has too many Body parameters上边的报错提示为body太多了,feign调用的方法里只能有一个body但是requestparam可以多个错误写法:正确写法:异常原因:当使用Feign时,如果发送的是get请求,那么需要在请求参数前加上@RequestParam注解修饰,Controller里面可以不加该注解修饰。body的正确形式:客户端:服

2021-08-28 16:05:44 3578

原创 java正则截取字符串中的身份证号/车牌号/手机号

1.身份证号/车牌号/手机号的正则表达式String phoneVerify = "(1|861)(3|5|8)\\d{9}$*";String idCardVerify = "([1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx])|([1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3})";

2021-08-11 21:53:30 3352 1

原创 postman传对象后台获取的值全部为null

请求的时候传了时间但是后台取到的都是null,则需要再对象上加@RequestBody即可

2021-08-11 16:51:11 2883

原创 MyBatisPlus大于等于、小于等于等等函数

原符号 < <= > >= <>对应函数 lt() le() gt() ge() ne()Mybatis-plus写法: queryWrapper.ge("create_time", localDateTime);Mybatis写法: where create_time >= #{localDateTime}...

2021-08-11 16:46:53 2822

原创 Unable to obtain LocalDateTime from TemporalAccessor: {},ISO resolved to 2000-01-01 of type java.tim

String转LocalDateTime 时报错DateTimeFormatter formatter = new DateTimeFormatterBuilder()LocalDateTime localDateTime = LocalDateTime.parse("2018-12-11", formatter);改用这个即可:LocalDateTime localDateTime2 = LocalDate.parse("2018-12-11", DateTimeFormatter.ISO_D.

2021-08-11 16:44:49 1009

原创 java8集合

先new对象@Data@AllArgsConstructor@Slf4jpublic class User { private String phone; private String customerCode; private Integer age; private Boolean enabled; private Boolean deleted;} //初始集合 List<User> list = new ArrayL

2021-04-09 16:56:40 68

原创 wrapper自定义sql 使用条件构造器作为参数

1.外部wrapper当参数,做好条件2.只需添加 ${ew.customSqlSegment}和@Param(Constants.WRAPPER)即可mapper.java定义接口方法3xml写法:可以ew.customSqlSegment也可以换成<where>{ew.customSqlSegment}也可以换成<where>ew.customSqlSegment也可以换成<where>{ew.SqlSegment}4.生成的sql语句:SELEC

2021-01-04 15:25:50 1945

原创 服务器部署nginx步骤与启动时出现的问题

1.安装命令:sudo yum install nginx显示Complete!提示安装成功2.安装完成后,使用以下命令启用并启动Nginx服务:sudo systemctl enable nginxsudo systemctl start nginx有可能会出现:Job for nginx.service failed because the control process exited with error code.See “systemctl status nginx.servic

2020-12-21 10:55:50 251 1

原创 jeecgboot开发配置

1.jeecgboot官方:官方网站: http://www.jeecg.com源码下载: https://github.com/zhangdaiscott/jeecg-boot2.代码拉下来后,在Terminal进入到vue文件位置,输入yarn install下载vue依赖。3.在配置application-dev.yml里的数据库信息4.再配置代码生成器的数据库和代码生成的包路径等:步骤1是可以再生成时单独选择,也可以在这配置好的生成文件位置,2是代码上包路径位置。代码生成器数据库

2020-12-14 15:10:42 1044

原创 jeecgboot生成vue报错Exception message was already printed; see it above ...

这是因为你在jeecgboot点击在线开发时直接点击表生成代码,数据库表不一致造成的,所以请先删除jeecgboot上的表记录,再点击导入数据库表再此生成即可,下边是步骤:1.先删除在线开发上之前同步的表信息2.再点击同步数据库3.再次选择生成即可:...

2020-12-14 14:49:07 1031

原创 禅道数据库迁移从8.2.6版迁移到12.5最新版

1.先在linux服务器安装最新禅道安装步骤:https://blog.csdn.net/qq_41136963/article/details/1102304962.安装之后要做的就是将数据库中zentao的数据进行同步,老禅道8.26版有44张表,新禅道12.5版有71张表。8.2.6:12.5:3.表结构如下一、我的地盘相关的表zt_todo,待办事宜表。二、产品相关的表zt_product,记录了产品相关的信息。zt_productplan,记录了产品的计划信息。zt_st

2020-12-04 16:01:58 560

原创 Linux上禅道数据库在navicat链接

1.处填写Linux服务器的地址,2处填写登录服务器的管理员账号号密码本地的端口对应安装禅道时设置的mysql端口,默认数据库初始root密码123456禅道服务器端口设置:https://blog.csdn.net/qq_41136963/article/details/110230496...

2020-12-03 14:24:18 631

原创 linux两台服务器之间的文件或文件夹的发送

跨服务器拷贝需要用到的命令是scp.1.把当前文件夹tempA拷贝到 目标服务器110.37.88.12 服务器的 /tmp/wang/文件夹下scp -r /var/www/html root@110.37.88.12:/opt/webapps/upload其中root是目标服务器的用户名,执行命令提示输入密码,然后输入密码即可2.把当前文件夹tempA.txt拷贝到 目标服务器110.37.88.12服务器的 /tmp/wang/文件夹下scp /var/www/html/abc.png ro

2020-12-03 14:09:07 190

原创 本地主机Xshell连接虚拟机Linux CentOS7

1.我的是centos7,xshell62.首先将虚拟机ip设置为静态打开网卡文件 vi /etc/sysconfig/network-scripts/ifcfg-ens33网关IP修改网卡文件IDADDR是虚拟机IPNETMASK是子网掩码NET_CONTROLLED=noGATEWAY=网关IP重启网络服务systemctl restart network开启sshd服务service sshd start在虚拟机ping主机IP主机ping虚拟机再打开Xshel

2020-11-28 22:25:57 1785

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除