All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codingapi.springboot.security.dto.request.LoginRequestContext Maven / Gradle / Ivy

There is a newer version: 3.2.6
Show newest version
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);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy