Добавление реплик и балансировщик миграции отдельно

This commit is contained in:
Dmitry
2026-10-26 20:58:48 +03:00
parent 0ab3a341aa
commit 189f880651
66 changed files with 2851 additions and 0 deletions
@@ -0,0 +1,19 @@
package org.example.config;
import org.example.model.User;
public class UserContext {
private static final ThreadLocal<User> CURRENT_USER = new ThreadLocal<>();
public static void setCurrentUser(User user) {
CURRENT_USER.set(user);
}
public static User getCurrentUser() {
return CURRENT_USER.get();
}
public static void clear() {
CURRENT_USER.remove();
}
}