Java
四火流年
这个作者很懒,什么都没留下…
展开
-
2021-12-13 FileNotFoundException when trying to read a resource file
Issue DescriptionString resource = ZipFileOutDemo.class.getClassLoader().getResource("1.txt").getPath();1.txt is put under folder “resources”.This code could be able to run within IDE (Intellij), but not able to run after packaged to a jar. Got below e原创 2021-12-13 23:23:58 · 256 阅读 · 0 评论 -
2020-09-27 clojure环境搭建 - Leiningen的安装
这里写自定义目录标题下载jar包下载lein.bat修改lein.bat运行参考下载jar包https://github.com/technomancy/leiningen/downloads下载 leiningen-2.0.0-preview10-standalone.jar (这个是2012年的版本)下载lein.bathttps://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein.bat但是需要翻墙,所以这里我原创 2020-09-27 20:19:18 · 1303 阅读 · 0 评论 -
2019-06-21 Sonar Java静态代码质量检测
Sonarqube 安装说明安装 Docker下载镜像docker pull sonarqube:ltsdocker pull mysql:5.6.43启动mysql,root账号登录docker run --name mysql -p 3308:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql:5.6.43 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci注原创 2020-09-06 16:54:27 · 301 阅读 · 0 评论 -
2020-08-28 Java的一些工具
JD-GUI 可以反编译jar包JProfiler,一个商业的、收费的profiler,Honest profiler,开源的VisualVM,原创 2020-08-28 19:49:34 · 120 阅读 · 0 评论 -
2019-05-10 记一次Java性能调优
一、背景线上某一项目,在抓取数据时,出现了数据积压的情况,必须每天或者每半小时清空一次。已知:该情况发生在19年年初左右,之前并没有数据积压;原先的数据抓取能力,大约是 100w~200w TPS原先有7台服务器,每台服务器开启了一个ftp服务,用于接收数据,同时每台服务器上有一个 greedy 进程在进行数据抓取,现在7台变为5台;小文件数增多,大约每秒100~200个,大小在几十K左右(以往情况不清楚)二、最终优化效果优化前,4月30日一天的数据抓取量为4.4亿行,即5093TPS,单原创 2020-08-27 21:40:02 · 199 阅读 · 0 评论 -
2019-05-10 honest profiler 编译、打包、使用记录
https://github.com/jvm-profiling-tools/honest-profiler背景使用 profiler 进行 Java 性能分析的时候,占用时间最长的是 epollWait,据说是 profiler 本身抽样的时候的问题(这个回头再搞清楚具体原因)。所以使用 honest-profiler,即 hprofilerHonest profiler相比于其他的 sampling profilers,有以下两个优势:1.It accurately profiles app原创 2020-08-27 21:14:23 · 344 阅读 · 0 评论 -
2019-10-11 Spring Boot之DevTools热部署
用Intellij进行开发时,直接启动Spring的Application,然后修改代码,可以自动重启,不需要停下来、打包、运行。在 pom.xml 里增加一个依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true原创 2020-08-27 19:32:25 · 100 阅读 · 0 评论