上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: 分页 /** * mongo 分页 */ @Test public void testPage() { int pageSize = 10; int currentNo = 0; Query query = new Query(); query.addCriteria(Criteria.where( 阅读全文
posted @ 2024-03-27 11:25 洞玄巅峰 阅读(42) 评论(0) 推荐(0) 编辑
摘要: jackjson自动丢弃了小数位最末尾的0 private BigDecimal price; price=12.10; 返回自动转为了12.1 解决方案 1: 返回字段都用字符串 2:BigDecimal序列化自定义处理 package com.lenovo.lps.cost.integrator 阅读全文
posted @ 2023-08-12 10:28 洞玄巅峰 阅读(275) 评论(0) 推荐(0) 编辑
摘要: SpringBooot 2.5.12 package com.lenovo.lps.cost.servicecto.config; import org.springframework.context.annotation.Bean; import org.springframework.conte 阅读全文
posted @ 2023-08-12 10:24 洞玄巅峰 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 1:eureka集群:原则,相互注册即可 注意: a:必须要有示例名,且必须相同 b:集群模式必须开启注册registerWithEureka: true,单机情况下这个是false c:如果用域名,必须映射hosts 以下用两个节点做演示server1,server2 server-1: serv 阅读全文
posted @ 2021-05-02 20:23 洞玄巅峰 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Redmibook笔记本触摸板失灵: 1:F12 打开或关闭触摸板 2:设置->触摸板 看是否打开,一般来讲是第一个问题。 阅读全文
posted @ 2021-03-13 20:59 洞玄巅峰 阅读(11245) 评论(0) 推荐(0) 编辑
摘要: AES: package com.example.wuji.jiami; import com.sun.org.apache.xml.internal.security.utils.Base64; import javax.crypto.Cipher; import javax.crypto.spe 阅读全文
posted @ 2021-02-17 18:27 洞玄巅峰 阅读(74) 评论(0) 推荐(0) 编辑
摘要: package com.example.mydemo.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import sun.misc.BASE64Decoder; import java.io.InputStream; i 阅读全文
posted @ 2021-02-17 18:11 洞玄巅峰 阅读(630) 评论(0) 推荐(0) 编辑
摘要: 测试数据:大猫🦁 #设置表utf8mb4字符集 alter table integral_log character set utf8mb4; #设置某个字段utf8mb4字符集 alter table <表名> change <字段名> <字段名> <类型> character set utf8 阅读全文
posted @ 2021-02-03 11:55 洞玄巅峰 阅读(729) 评论(0) 推荐(0) 编辑
摘要: 测试数据表: CREATE TABLE `school_score` ( `id` int NOT NULL AUTO_INCREMENT, `name` char(1) DEFAULT NULL, `course` char(10) DEFAULT NULL, `score` int DEFAUL 阅读全文
posted @ 2021-02-02 11:32 洞玄巅峰 阅读(266) 评论(0) 推荐(0) 编辑
摘要: windows cd 失败 则 在目标路径前边加上 /d cd /d d: 在 cd 和盘符之间加上 /d cd /d D:\mysql\mysql-5.7.33-winx64\bin 新建my.ini 安装目录Date不要手动建,会自动建立 [mysqld] # 设置3308端口 port=330 阅读全文
posted @ 2021-01-31 11:19 洞玄巅峰 阅读(130) 评论(0) 推荐(0) 编辑
摘要: A temporary password is generated for root@localhost: upkiQXrdO8+l mysql8zip安装教程:1:下载mysql-8.0.23-winx64 并且解压缩2: 配置环境变量,比如: D:\mysql\mysql-8.0.23-winx 阅读全文
posted @ 2021-01-30 21:27 洞玄巅峰 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 基于SpringBoot中的mongoTemplate实现 工具类: package com.cf.common; import com.github.pagehelper.PageInfo; import org.springframework.data.mongodb.core.query.Qu 阅读全文
posted @ 2020-11-29 13:38 洞玄巅峰 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 核心配置,注入RestTemplate为Bean package com.example.demo.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annot 阅读全文
posted @ 2020-11-29 13:24 洞玄巅峰 阅读(3251) 评论(0) 推荐(0) 编辑
摘要: package com.example.demo; import java.util.ArrayList; import java.util.List; public class BatchTest { /** * 批量写入 * * @param args */ public static void 阅读全文
posted @ 2020-10-25 09:53 洞玄巅峰 阅读(436) 评论(0) 推荐(0) 编辑
摘要: 平时在springboot中使用线程很常见,也没有太在意相关细节,今日在springboot单元测试中测试异步线程,发现异步线程没有执行,苦思悯想,没有结论;观察日志发现,主线程执行完毕,springboot线程池关闭,这时才明白,虽是单元测试,却走的一个完整的springboot生命周期,主线程执 阅读全文
posted @ 2020-04-30 10:25 洞玄巅峰 阅读(2474) 评论(2) 推荐(2) 编辑
摘要: SpringBoot2.2.4.RELEASE集成Swagger <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2 阅读全文
posted @ 2020-02-26 12:01 洞玄巅峰 阅读(805) 评论(0) 推荐(0) 编辑
摘要: parent-pom.xml: <?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- 阅读全文
posted @ 2020-02-25 18:26 洞玄巅峰 阅读(1038) 评论(0) 推荐(0) 编辑
摘要: Java实现 package com.example.mydemo.util; /** * 描述: Twitter的分布式自增ID雪花算法snowflake (Java版) * * @author * @create 2018-03-13 12:37 **/ public class SnowFla 阅读全文
posted @ 2020-02-24 20:01 洞玄巅峰 阅读(2300) 评论(0) 推荐(0) 编辑
摘要: package com.example.springbootshardingjdbc.util; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; public class MyUtil { publ 阅读全文
posted @ 2020-02-24 16:52 洞玄巅峰 阅读(5364) 评论(0) 推荐(0) 编辑
摘要: 受疫情影响,在家办公正在兴起,故而关注vpn搭建是非常有必要的。 1:首先需要注册一个花生壳账号 https://login.oray.com/ 2:然后下载下载【vpn蒲公英客户端】 https://pgy.oray.com/download/ 我们选择windows即可 3:登录蒲公英后台 ht 阅读全文
posted @ 2020-02-14 14:42 洞玄巅峰 阅读(1873) 评论(0) 推荐(0) 编辑
摘要: 安装nginx: yum install gcc-c++ yum install -y pcre pcre-devel yum install -y zlib zlib-devel yum install -y openssl openssl-devel 保证nginx 可以正常访问: 我这里129 阅读全文
posted @ 2020-02-12 22:37 洞玄巅峰 阅读(347) 评论(1) 推荐(0) 编辑
摘要: 第一步:下载xxl-job工程代码: https://gitee.com/dongfangxuri/springboot 下下来工程如下: admin >>后天管理,用于配置xxl-job各项数据 sample-springboot >> 一个springboot集成xxl-job的demo 我们不 阅读全文
posted @ 2020-02-01 14:30 洞玄巅峰 阅读(5564) 评论(0) 推荐(0) 编辑
摘要: java8 日期类库基本使用 public static void main(String[] args) { /** * java 比较两个日期的差 年 月 日 等 */ DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPatte 阅读全文
posted @ 2020-01-21 10:34 洞玄巅峰 阅读(268) 评论(0) 推荐(0) 编辑
摘要: org.apache.http.TruncatedChunkException: Truncated chunk 项目中使用请求远程接口报错 ,项目是Spring-boot的,两个项目(A和B) , A调用B的rest接口,返回json数据,A系统报错如下异常,B系统没有报错。记录一下处理方式,方便 阅读全文
posted @ 2020-01-20 17:22 洞玄巅峰 阅读(2936) 评论(0) 推荐(0) 编辑
摘要: SpringBoot注解验证参数 废话不多说,直接上表格说明: 注解 作用类型 解释 @NotNull 任何类型 属性不能为null @NotEmpty 集合 集合不能为null,且size大于0 @NotBlanck 字符串、字符 字符类不能为null,且去掉空格之后长度大于0 @AssertTr 阅读全文
posted @ 2020-01-02 13:30 洞玄巅峰 阅读(1645) 评论(0) 推荐(0) 编辑
摘要: LocalDateTime localDateTime=LocalDateTime.now(); //格式化日期时间类型为字符串 DateTimeFormatter dateTimeFormatter=DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss" 阅读全文
posted @ 2020-01-01 14:06 洞玄巅峰 阅读(17961) 评论(0) 推荐(0) 编辑
摘要: 1:docker中mysql跟宿主机做了端口映射,允许任意ip访问 2:本地Navicat 可以连接docker 中 mysql 3:jdbc连接不上 报错如下: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException 阅读全文
posted @ 2019-12-25 13:19 洞玄巅峰 阅读(5806) 评论(0) 推荐(0) 编辑
摘要: 收集内存溢出Dump文件 收集Dump文件有两种方式: 设置JVM启动参数-XX:+HeapDumpOnOutOfMemoryError-XX:HeapDumpPath=/opt/jvmdump 设置JVM启动参数-XX:+HeapDumpOnOutOfMemoryError-XX:HeapDump 阅读全文
posted @ 2019-12-25 10:10 洞玄巅峰 阅读(538) 评论(0) 推荐(0) 编辑
摘要: 加读写锁 package com.example.demo.util.dxc; import java.util.concurrent.locks.Lock;import java.util.concurrent.locks.ReadWriteLock;import java.util.concur 阅读全文
posted @ 2019-12-17 20:59 洞玄巅峰 阅读(311) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-12-17 15:53 洞玄巅峰 阅读(3) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页