自定义博客皮肤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)
  • 资源 (5)
  • 收藏
  • 关注

原创 根据文件头判断是否是excel

网上一搜,有很多根据文件头判断是否是excel。测试机器是mac 系统,均不能满足需求。经大佬提示,使用Files。代码片段如下File file = new File("填入本机excel路径")final Path path = Paths.get(file.toURI()); final String restult = Files.probeContentType(path); System.out.println("content-type" + restult);上面代码经过测试

2021-04-13 14:29:05 688 2

原创 cron 实用工具类

倒入xml<!-- https://mvnrepository.com/artifact/org.quartz-scheduler/quartz --><dependency> <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId> <version>2.3.2</version></dep

2020-07-29 14:55:58 451

原创 数据库连接池 datasource

<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <dependency> <groupId>com.alibaba</groupId> ..

2020-05-31 14:02:20 272

原创 数据库事务遇到的一点坑

数据库操作回滚 失败 spring-boot jpa oracle现场 public String update(MenuApi menuApi){ final Optional<MenuApi> byId = menuApiCodeRepistory.findById(menuApi.getMenuId()); doUpdate(menuApi, byId); return "success"; } @Transactio

2020-05-30 15:42:47 2543

原创 jaeger

Jaeger属于的就是追踪系统,度量系统我们则会使用prometheus,日志系统一般则是elk参考:https://www.jianshu.com/p/ffc597bb4ce8

2020-04-16 23:46:21 194 1

转载 opentraceing 协议

参考: https://segmentfault.com/a/1190000011636957

2020-04-16 23:44:13 574

转载 intellij

字体注释https://blog.csdn.net/sdut406/article/details/81750858

2020-04-16 23:42:47 176

转载 elk

参考 https://blog.csdn.net/zyplxl/article/details/82621540

2020-04-16 23:38:33 112

原创 常用maven jar

spring-boot 自动弹出 配置提示<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> &lt...

2020-04-14 23:38:00 79

原创 mybatis 打印sql 日志

pom.xml<dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </depend...

2020-04-14 23:01:13 150

转载 spring mybatis

xml 配置 foreach参考 https://mp.csdn.net/console/contentRelease/Blog

2020-04-13 23:21:04 93

转载 tomcat 排错

https://blog.csdn.net/soha_dong/article/details/78839874

2020-04-11 11:50:34 144

原创 redis 相关操作

关闭保护模式redis.conf#注释这行#bind 127.0.0.1#关闭保护模式#protected-mode yesprotected-mode no参考: https://blog.csdn.net/a532672728/article/details/78035559

2020-04-11 11:00:50 92

原创 elasticsearch

查询某个索引下面的所有数据GET /trace/_search?q=*Elasticsearch核心概念VS数据库核心概念Elasticsearch 数据库Document 行Type 表Index 库filed 字段...

2020-04-10 15:12:39 119

原创 jdk 版本问题

jdk 11.0.2 编译的程序 放到 tomcat (jdk 1.8)会有问题,访问不了

2020-04-10 07:37:34 489

原创 maven 插件

maven 插件XXX中没有主清单属性<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId></plugin>

2020-04-09 20:00:53 125

原创 雪花算法 snowflake

时间戳: 41位 接近 70年的毫秒数据序列号: 某一个机器 可以在某一个毫秒可以产生4000多个值(4000多个唯一id)

2020-04-07 21:23:28 278

原创 go 源代码编译

GOROOT_BOOTSTRAP=/home/user/go/go GO_GCFLAGS="-N -l" ./all.bash参考:https://golang.google.cn/dl/

2020-04-06 23:10:58 275

原创 ntpdate 服务器 同步时间

ntpdate -u ntp.api.bz # 从一个时间服务器同步时间结合定时

2020-04-06 17:47:32 2386

原创 resttemplate

ribbon 拦截了resttemplate 进行了负载

2020-04-04 10:03:32 2163

原创 正则

https://www.runoob.com/java/java-regular-expressions.html

2020-04-02 22:39:38 104

原创 nginx 配置以及常用场景

Nginx主要命令./nginx 启动nginx./nginx -s stop 终止nginx(当然也可以找到nginx进程号,然后使用kill -9 杀掉nginx进程)./nginx -s reload (重新加载nginx.conf配置文件)Nginx的核心配置文件conf/nginx.conf包含三块内容:全局块、events块、http块全局块从配置文件开始到events块之...

2020-04-01 21:12:09 89

转载 prometheus consul服务发现

参考:https://blog.51cto.com/1000682/2363038

2020-03-30 16:12:47 156

原创 前后段分离 两次请求session不一致 nginx做转发

server.servlet.session.cookie.path=/

2020-03-30 15:44:58 743

原创 jvm cpu 100% 负载明显增加

jstat -gcutil 123456 2000 1000123456 是pid2000 是以毫秒表示的采样周期1000 是采样的数量100% 说明应该是 jvm 堆内存不够 或者内存泄漏jmap -dump:file=heap.dump 123456显示了与gc相关的堆信息输出jstat -gc 123456显示了最近一次gc的原因以及当前gc的原因jstat -gccau...

2020-03-28 22:00:49 273

转载 elasticsearch grafana

lucence query 输入 *参考: https://blog.csdn.net/qq_23598037/article/details/99852350

2020-03-27 11:26:53 136

原创 prometheus报错Error refreshing service Unexpected response code: 503解决办法

参考: http://www.amd5.cn/atang_4306.html

2020-03-25 17:43:50 1766

原创 prometheus 端口 路径映射 之relabel_configs 标签

参考:https://blog.csdn.net/aixiaoyang168/article/details/103022342https://www.jianshu.com/p/085edb535070

2020-03-25 13:00:18 583

转载 centos7 安装elasticsearch6.4.0

参考 https://blog.csdn.net/zyplxl/article/details/82529278

2020-03-24 10:06:34 74

转载 Prometheus + Grafana 系统监控之Elasticsearch

参考:https://www.cnblogs.com/caoweixiong/p/12156590.html

2020-03-23 13:33:55 691

原创 spring-boot redis基于API的缓存实现

1 dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency>2 applicat...

2020-03-21 10:45:50 137

原创 spring-boot 基于注解 redis缓存实现

1 dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency>2 applicat...

2020-03-20 23:37:54 87

原创 spring-boot 缓存

1 sqlCREATE DATABASE demo;USE demo;DROP TABLE IF EXISTS t_article;CREATE TABLE t_article ( id int(20) NOT NULL AUTO_INCREMENT COMMENT '文章id', title varchar(200) DEFAULT NULL COMMENT '文章标题', ...

2020-03-19 23:33:34 85

原创 spring-boot i18n 国际化

1 LocaleResolver实现@Configurationpublic class MyLocaleResovle implements LocaleResolver { // 自定义 区域解析方式 @Override public Locale resolveLocale(HttpServletRequest httpServletRequest) { ...

2020-03-19 23:04:20 168

原创 spring-boot redis

1 dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> <...

2020-03-19 20:52:27 66

原创 spring-boot jpa

1 dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </depende...

2020-03-19 20:36:45 114

转载 prometheus 远程 存储 influxdb

https://www.cnblogs.com/aguncn/p/10002426.html

2020-03-19 16:36:41 736

转载 influxdb

https://www.jianshu.com/p/5968e7aa1e1f

2020-03-19 16:23:11 94

原创 spring-boot mybatis 配置文件

1 pom.xml<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>...

2020-03-18 21:23:30 97

原创 spring-boot mybatis 注解整合

1 pom.xml <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version&gt...

2020-03-18 21:12:31 111

java 完全自学手册

java 完全自学手册

2013-09-05

nagios 资源监控工具

nagios 资源监控工具

2013-09-05

struts2+hibernate整合 练习之CURD 完整版

一个完整struts2+hibernate整合 练习之CURD 完整版,带说明名书,需求分析,适合初学者的练习

2012-06-20

j2ee api参考资料

java很好的参考资料 类似于j2se的java api

2012-03-13

javaqq点对点广播

用java实现的,可以点对点通信,广播。还有登陆界面

2011-12-13

空空如也

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

TA关注的人

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