- 博客(26)
- 资源 (1)
- 收藏
- 关注
原创 spirng-boot-websocket 项目配置
https://github.com/Flying9001/springBootDemo项目来源这个但是这个spring-socket文档:https://github.com/Flying9001/springBootDemo/blob/master/doc/39.spring_boot_2.2_websocket_simple_2.md但是里面有个bug,启动会失败。没有被加载到tomcat容器里配置里面加上这就可以了(来源:https://github.com/spring..
2021-01-15 15:12:34
229
原创 java 循环删除map中的数据 异常处理以及正确处理
第一种方式通过迭代器删除Map集合中的key-value值Iterator<String,String> iter = map.keySet().iterator();while(iter.hasNext()){ if(iter.next().getValue().equals("sss")){ // map.remove(key); // java.util.ConcurrentModificationException
2020-12-24 14:39:53
1895
原创 excel 导入导出 基于hutool,swagger 开发的工具
导出 private static final String VND_MS_EXCEL = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"; private static final String FORM_DATA_TYPE = "multipart/form-data"; private static final String OCTET_STREAM_TYPE
2020-12-24 14:22:06
325
1
原创 Jenkins配置说明
dev环境前端项目部署说明 原始方式 构建脚本 rm -rf dist.tar.gzcnpm installcnpm run build cd disttar -zcvf dist.tar.gz * 部署脚本 cd /home/jenkinswork/nginx/htmltar -xzvf dist.tar.gzrm -rf dist.tar.gz Docker方式 构建脚本 cnpm installcnpm run buildcp
2020-12-09 11:45:36
581
原创 Mybatis-plus使用时间查询注意点
1、引入问题近日有群成员提出一个问题:数据库是date类型,MyBatis传入timestamp类型参数,但是查询结果为 0 。如下所示:Preparing: select * from t_plan where begin_date = ?Parameters: 2018-06-15 00:00:00.0(Timestamp)Total: 0可是,通过数据库管理工具可以查出数据,sql 如下所示:select * from t_plan where begin_date = date(“2
2020-12-09 11:30:22
3101
1
原创 BigDecimal相关计算
创建BigDecimal这个对象正确方式应该为:new BigDecimal(“7900”)错误示范:new BigDecimal(7900)除法使用,需要指明保留位数,单单只指明这个,默认是去掉小数点之后的数字错误示范:new BigDecimal(“7900”).divide(new BigDecimal(“80000”), 4)正确应为:指明进位方式new BigDecimal(“7900”).divide(new BigDecimal(“80000”), 4,BigDecimal.
2020-12-09 11:29:10
276
原创 maven spring-cloud-alibaba 配置
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.
2020-12-09 11:23:13
1996
原创 阿波罗无法通过链接外网
官方提供说明官方地址无法连接外网的原因通常是阿波罗走到内网,无法访问注册无法连接上来#!/bin/bash# apollo config db infoapollo_config_db_url=jdbc:mysql://localhost:3306/ApolloConfigDB?characterEncoding=utf8apollo_config_db_username=r...
2020-03-31 20:30:25
1464
原创 maven XML配置
<?xml version="1.0" encoding="UTF-8"?><!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this...
2020-03-31 20:17:13
606
转载 Dubbo服务发布在阿里云ECS,本地无法获取到服务
dubbo服务器部署在阿里云ECS, zookeeper 启动成功,providers / consumers 注册成功,但本地(外网)无法访问ECS上dubbo服务。原因是dubbo提供者注册默认使用ECS内网IP地址,所以外网无法访问。解决办法:修改host文件1.hostname 查看主机名称2. vim/etc/hosts3. 黄线 - 主机名 / 红线 - 外网...
2020-03-31 16:00:50
412
原创 postgresql数据库 树形菜单查询
with d as ( select z.dictid ,z.dictlv ,z.dicttarget ,z.code ,z.code_p ,z.value ,z.enabled ,0 lv ,to_char(z.orderid,'fm000000') fullorder ...
2019-09-17 19:18:07
1004
原创 pgsql 分页查询方式
select row_number() over(order by 业务号,主键,排序号) rn -- 行号 ,count(0) over() cnt -- 总条数 ,idfrom 表order by 排序号,主键,业务号offset (页号- 1)* 每页数量 limit 每页数量...
2019-09-17 19:11:12
3857
原创 postgresql数据库 列出今年全部月份
with mon as( select mon::date mon from generate_series(date_trunc('year', now())::date, date_trunc('year', now())::date + '+1y -1d'::interval,'1mon'::interval) mon ) select * from...
2019-09-17 19:02:07
1765
原创 mybatis复合型数据返回List<String>String写法
第一种写法<resultMap id="roomResultMap" type="com.xs.ishp.afpt.dzdt.pojo.RoomDO"> <result column="cell_name" jdbcType="VARCHAR" property="cellName"/> <result column="main_police_...
2019-09-04 01:56:26
1352
原创 springboot 跨域解决方案
springboot版本 2.1.6第一种,配置springbean方式生效跨域通过springboot注解@Configurationpublic class MvcConfig { /** * 配置跨域bean * * @return org.springframework.web.servlet.config.annotation.WebMvcConfigure...
2019-08-12 20:12:51
469
原创 docker搭建nexus私人仓库
docker配置,可以翻阅我以前的文章有教程第一步用docker下载nexus查找nexusdocker search nexus拉取镜像docker pull sonatype/nexus3第二步运行nexus3docker run -d -p 8081:8081 -p 8082:8082 -p 8083:8083 -p 8084:8084 -p 80...
2019-08-11 21:38:17
312
原创 springboot 使用fastjson替代默认jackson(踩坑路)
最安全做法使用bean替代默认转换器方法@Configurationpublic class MyConfiguration { /** * 配置消息转换器 * new HttpMessageConverters(true, converters); * 一定要设为true才能替换否则不会替换 * @return 返回一个消息转换...
2019-08-07 15:20:00
4587
原创 windows 系统下的docker 外置vue开发环境
安装环境DockerToolbox-18.03.0-cenode-8.9.3外置需要文件交换注意编译器没有开发环境,仅仅是一个代码提示工具1.使用FTP进行文件交换2.使用共享文件夹进行交换3.使用samba服务器进行交换我自己使用的共享文件夹交换步骤1docker pullnode-8.9.3步骤2运行node环境docker run...
2019-05-08 14:08:41
1117
原创 docker安装 windows10以下版本安装
首先下载一个DockerToolbox官网提供地址https://docs.docker.com/toolbox/overview/阿里提供地址http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/docker toolbox 是一个工具集,它主要包含以下一些内容:Docker CLI 客户端,用来运行dock...
2019-05-04 22:34:11
2015
1
原创 docker安装 centos7
系统要求cenos7以上step 1: 安装必要的一些系统工具sudo yum install -y yum-utils device-mapper-persistent-data lvm2Step 2: 添加软件源信息sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/d...
2019-04-29 18:14:36
280
原创 layui 模块化 详解
layui.define(function(exports){ //提示:模块也可以依赖其它模块,如:layui.define('layer', callback); var obj = { hello: function(str){ alert('Hello '+ (str||'mymod')); } }; //输出test接口 exports...
2019-04-05 18:18:29
3200
原创 Java内存模型
这是一副简单的jvm导图,面试官问道jvm模型,回来下总结下。对象创建参考<深入理解java虚拟机>,<java虚拟机规范>
2019-03-04 19:09:17
342
原创 设计模式之过滤器模式
过滤器模式(Filter Pattern)或标准模式(Criteria Pattern)是一种设计模式这种类型的设计模式属于结构型模式,它结合多个标准来获得单一标准。应用场景: 比如消息过滤,日志过滤。特点: 清除不需要的内容UML图下面是类实现定义过滤的对象一个普通的类/** * 这是...
2019-03-02 22:35:06
342
原创 题目:8位数的日期字符串存进一个长为3的字节数组里面,然后再取出这8位数日期
例如:2008 -01 - 03思路:首先1字节=8位那么3字节= 24位年份最高为9999 可以用 2位^14表示 也就是14 月份最高为12 可以用 2^4 表示 也就是4位 天数最高为31 可以用 2^5 表示 也就是5位 结果就是14 + 4 +5 = 23位(这就是计算好的,(0.0‘)呵呵) public voi...
2019-03-01 23:29:44
703
原创 按位或 按位与 按位异或 (| & ^) 入门及技巧
|按位或:参与运算的两数各对应的二进位相或.只要对应的二个二进位有一个为1时,结果位就为1例如: 1|2 : 0001 | 0010 = 00119|5 : 1001 | 0101 = 1101所以9|5=13& 按位与:参与运算的两数各对应的二进位相与.只有对应的两个二进位均为1时,结果位才为1,否则...
2019-02-21 15:14:08
4063
转载 红黑树-性质图解
RBT 红黑树AVL是严格平衡树,因此在增加或者删除节点的时候,根据不同情况,旋转的次数比红黑树要多;红黑是弱平衡的,用非严格的平衡来换取增删节点时候旋转次数的降低;所以简单说,搜索的次数远远大于插入和删除,那么选择AVL树,如果搜索,插入删除次数几乎差不多,应该选择RB树。红黑树上每个结点内含五个域,color,key,left,right,p。如果相应的指针域没有,则设为NIL。一般的,红黑树...
2018-06-18 18:04:18
327
vueTools开发浏览器工具
2019-07-20
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人