Giriş
Şu satırı dahil ederiz.
Şöyle yaparız.
Şöyle yaparız.
Kullanmak için şöyle yaparız.
Şu satırı dahil ederiz.
import org.springframework.security.web.savedrequest.HttpSessionRequestCache;Şöyle yaparız.
HttpSessionRequestCache httpSessionRequestCache = new HttpSessionRequestCache();Şöyle yaparız.
httpSessionRequestCache.setCreateSessionAllowed(false);Kullanmak için şöyle yaparız.
public class ApiSecurityConfig extends WebSecurityConfigurerAdapter {
  public HttpSessionRequestCache getHttpSessionRequestCache() {
    HttpSessionRequestCache httpSessionRequestCache = new HttpSessionRequestCache();
    httpSessionRequestCache.setCreateSessionAllowed(false);
    return httpSessionRequestCache;
  }
  @Override
  protected void configure(final HttpSecurity http) throws Exception {
    http.requestCache().requestCache(getHttpSessionRequestCache());
} 
Hiç yorum yok:
Yorum Gönder