isir1234's recent timeline updates
isir1234

isir1234

V2EX member #417821, joined on 2019-06-02 17:07:01 +08:00
Today's activity rank 7181
3 G 83 S 81 B
isir1234's recent replies
每日一题
1. state 初始 10000,
2. 线程 1 执行了 countDown => state=9999
3. 线程 2 执行了 countDown => state=9998
4. 线程 1 执行 getCount => 输出 9998
5. 线程 2 执行 getCount => 输出 9998
select student_id, gap
from (select student_id,
last_value(score) over (partition by student_id order by created_at) -
first_value(score) over (partition by student_id order by created_at) AS gap,
row_number() over (partition by student_id order by created_at desc) rn
from exam) tmp
where rn = 1;
魔改了一下 start.spring.io, 根据 sql 生成 domain, mapper, service, controller

http://start.jiangy.me/
Oct 8, 2020
Replied to a topic by hello2060 Java 问个 Gatling 的问题
可以用
constantUsersPerSec(50) during (20000)
或者
rampUsers(1000000) during (20000)
Sep 29, 2020
Replied to a topic by PeiXyJ 程序员 Spring Security 官方文档学习
Spring Security 的 reference 第一遍看的时候真的是一脸懵逼

可以先看 <<Pro Spring Security>> 这本书
YouTube 上也有不少相关的 talk

也可以写个最简单的 demo, debug 源码走一下 filter 和认证 /授权流程
Spring Cloud Hoxton.SR5 版本的 Gateway 确实是有 file descriptor 无限增长的问题的, 可以作为一个排查点.
可以先查看每个进程打开的文件数:
ps -opid= -ax | xargs -L 1 -I{} -- sudo bash -c 'echo -n "{} ";sudo lsof -p {} 2>/dev/null | wc -l' | sort -nr -k2
Sep 5, 2020
Replied to a topic by RedBeanIce Java CompletableFuture 使用交流(其实是困解)
runAsync 后加上异常处理试试

比如 CompletableFuture.runAsync(()->xxx).exceptionally(e -> {
// print exception here
return null;
}))
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5359 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 20ms · UTC 08:47 · PVG 16:47 · LAX 01:47 · JFK 04:47
♥ Do have faith in what you're doing.