跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] Springboot 应用关闭清理 Redis 的 key

发表于

目前是 toB 项目,有些文件生产耗时比较久,生成的时候设置了锁,使用了 Redis,如果在生成阶段,应用停止,这些 key 会导致没有删除。目前有两种想法,1.需要应用关闭清理的 key ,在设置的使用同时也设置到一个统一的 Redis Set 中,在最后应用关闭的时候使用实现 DisposableBean 的 destroy 删除这些 key;2.可能就是把所有的前缀放到集合,通过 SCAN 方法,获取到也是 DisposableBean 的 destroy ;清理都是通过钩子函数去做 @PreDestroy 或者使用 ApplicationListener这些都可以。大家一般怎么做的。

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.