com.codingapi.springboot.security.dto.request.LoginRequestContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of springboot-starter-security Show documentation
Show all versions of springboot-starter-security Show documentation
springboot-starter-security project for Spring Boot
package com.codingapi.springboot.security.dto.request;
public class LoginRequestContext {
private static LoginRequestContext context = new LoginRequestContext();
private final ThreadLocal threadLocal = new ThreadLocal<>();
private LoginRequestContext() {
}
public static LoginRequestContext getInstance() {
return context;
}
public void set(LoginRequest request) {
threadLocal.set(request);
}
public LoginRequest get() {
return threadLocal.get();
}
public void clean() {
threadLocal.set(null);
}
}