Migrate to Jakarta EE 9
Closes gh-1949
This commit is contained in:
@@ -9,7 +9,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
optional 'javax.servlet:javax.servlet-api:3.1.0'
|
optional 'jakarta.servlet:jakarta.servlet-api:5.0.0'
|
||||||
testImplementation platform('org.junit:junit-bom:5.8.1')
|
testImplementation platform('org.junit:junit-bom:5.8.1')
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
|
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package sample;
|
package sample;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
public class TheTest {
|
public class TheTest {
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
provided 'javax.servlet:javax.servlet-api'
|
provided 'jakarta.servlet:jakarta.servlet-api:5.0.0'
|
||||||
testImplementation 'commons-io:commons-io:2.11.0'
|
testImplementation 'commons-io:commons-io:2.11.0'
|
||||||
testImplementation 'org.assertj:assertj-core:3.21.0'
|
testImplementation 'org.assertj:assertj-core:3.21.0'
|
||||||
testImplementation platform('org.junit:junit-bom:5.8.1')
|
testImplementation platform('org.junit:junit-bom:5.8.1')
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ package sample;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
import javax.servlet.annotation.WebServlet;
|
import jakarta.servlet.annotation.WebServlet;
|
||||||
import javax.servlet.http.HttpServlet;
|
import jakarta.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
@WebServlet("/")
|
@WebServlet("/")
|
||||||
public class HelloServlet extends HttpServlet {
|
public class HelloServlet extends HttpServlet {
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ dependencyManagement {
|
|||||||
dependency 'com.zaxxer:HikariCP:3.4.5'
|
dependency 'com.zaxxer:HikariCP:3.4.5'
|
||||||
dependency 'edu.umd.cs.mtc:multithreadedtc:1.01'
|
dependency 'edu.umd.cs.mtc:multithreadedtc:1.01'
|
||||||
dependency 'io.lettuce:lettuce-core:6.1.5.RELEASE'
|
dependency 'io.lettuce:lettuce-core:6.1.5.RELEASE'
|
||||||
dependency 'javax.annotation:javax.annotation-api:1.3.2'
|
dependency 'jakarta.annotation:jakarta.annotation-api:2.0.0'
|
||||||
dependency 'javax.servlet:javax.servlet-api:4.0.1'
|
dependency 'jakarta.servlet:jakarta.servlet-api:5.0.0'
|
||||||
dependency 'mysql:mysql-connector-java:8.0.26'
|
dependency 'mysql:mysql-connector-java:8.0.26'
|
||||||
dependency 'org.apache.derby:derby:10.14.2.0'
|
dependency 'org.apache.derby:derby:10.14.2.0'
|
||||||
dependency 'org.assertj:assertj-core:3.21.0'
|
dependency 'org.assertj:assertj-core:3.21.0'
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ dependencies {
|
|||||||
api "org.springframework:spring-jcl"
|
api "org.springframework:spring-jcl"
|
||||||
|
|
||||||
optional "io.projectreactor:reactor-core"
|
optional "io.projectreactor:reactor-core"
|
||||||
optional "javax.annotation:javax.annotation-api"
|
optional "jakarta.annotation:jakarta.annotation-api"
|
||||||
optional "javax.servlet:javax.servlet-api"
|
optional "jakarta.servlet:jakarta.servlet-api"
|
||||||
optional "org.springframework:spring-context"
|
optional "org.springframework:spring-context"
|
||||||
optional "org.springframework:spring-jdbc"
|
optional "org.springframework:spring-jdbc"
|
||||||
optional "org.springframework:spring-messaging"
|
optional "org.springframework:spring-messaging"
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ package org.springframework.session.config.annotation.web.http;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import jakarta.annotation.PostConstruct;
|
||||||
import javax.servlet.ServletContext;
|
import jakarta.servlet.ServletContext;
|
||||||
import javax.servlet.SessionCookieConfig;
|
import jakarta.servlet.SessionCookieConfig;
|
||||||
import javax.servlet.http.HttpSessionListener;
|
import jakarta.servlet.http.HttpSessionListener;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
package org.springframework.session.security.web.authentication;
|
package org.springframework.session.security.web.authentication;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014-2019 the original author or authors.
|
* Copyright 2014-2021 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -19,10 +19,10 @@ package org.springframework.session.web.context;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import javax.servlet.DispatcherType;
|
import jakarta.servlet.DispatcherType;
|
||||||
import javax.servlet.Filter;
|
import jakarta.servlet.Filter;
|
||||||
import javax.servlet.FilterRegistration.Dynamic;
|
import jakarta.servlet.FilterRegistration.Dynamic;
|
||||||
import javax.servlet.ServletContext;
|
import jakarta.servlet.ServletContext;
|
||||||
|
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.core.Conventions;
|
import org.springframework.core.Conventions;
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ package org.springframework.session.web.http;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.springframework.session.web.http.CookieSerializer.CookieValue;
|
import org.springframework.session.web.http.CookieSerializer.CookieValue;
|
||||||
|
|
||||||
@@ -32,8 +32,8 @@ import org.springframework.session.web.http.CookieSerializer.CookieValue;
|
|||||||
* When a session is created, the HTTP response will have a cookie with the specified
|
* When a session is created, the HTTP response will have a cookie with the specified
|
||||||
* cookie name and the value of the session id. The cookie will be marked as a session
|
* cookie name and the value of the session id. The cookie will be marked as a session
|
||||||
* cookie, use the context path for the path of the cookie, marked as HTTPOnly, and if
|
* cookie, use the context path for the path of the cookie, marked as HTTPOnly, and if
|
||||||
* {@link javax.servlet.http.HttpServletRequest#isSecure()} returns true, the cookie will
|
* {@link jakarta.servlet.http.HttpServletRequest#isSecure()} returns true, the cookie
|
||||||
* be marked as secure. For example:
|
* will be marked as secure. For example:
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* HTTP/1.1 200 OK
|
* HTTP/1.1 200 OK
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ package org.springframework.session.web.http;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.http.Cookie;
|
import jakarta.servlet.http.Cookie;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Strategy for reading and writing a cookie value to the {@link HttpServletResponse}.
|
* Strategy for reading and writing a cookie value to the {@link HttpServletResponse}.
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ import java.util.List;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import javax.servlet.http.Cookie;
|
import jakarta.servlet.http.Cookie;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
@@ -88,7 +88,8 @@ public class DefaultCookieSerializer implements CookieSerializer {
|
|||||||
private String sameSite = "Lax";
|
private String sameSite = "Lax";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.springframework.session.web.http.CookieSerializer#readCookieValues(javax.
|
* @see
|
||||||
|
* org.springframework.session.web.http.CookieSerializer#readCookieValues(jakarta.
|
||||||
* servlet.http.HttpServletRequest)
|
* servlet.http.HttpServletRequest)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ package org.springframework.session.web.http;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link HttpSessionIdResolver} that uses a header to resolve the session id.
|
* A {@link HttpSessionIdResolver} that uses a header to resolve the session id.
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ import java.util.Enumeration;
|
|||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
import jakarta.servlet.ServletContext;
|
||||||
import javax.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
import javax.servlet.http.HttpSessionBindingEvent;
|
import jakarta.servlet.http.HttpSessionBindingEvent;
|
||||||
import javax.servlet.http.HttpSessionBindingListener;
|
import jakarta.servlet.http.HttpSessionBindingListener;
|
||||||
import javax.servlet.http.HttpSessionContext;
|
import jakarta.servlet.http.HttpSessionContext;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ package org.springframework.session.web.http;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contract for session id resolution strategies. Allows for session id resolution through
|
* Contract for session id resolution strategies. Allows for session id resolution through
|
||||||
|
|||||||
@@ -20,14 +20,14 @@ import java.io.IOException;
|
|||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import javax.servlet.ServletOutputStream;
|
import jakarta.servlet.ServletOutputStream;
|
||||||
import javax.servlet.WriteListener;
|
import jakarta.servlet.WriteListener;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpServletResponseWrapper;
|
import jakarta.servlet.http.HttpServletResponseWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for response wrappers which encapsulate the logic for handling an event when
|
* Base class for response wrappers which encapsulate the logic for handling an event when
|
||||||
* the {@link javax.servlet.http.HttpServletResponse} is committed.
|
* the {@link jakarta.servlet.http.HttpServletResponse} is committed.
|
||||||
*
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
@@ -84,16 +84,16 @@ abstract class OnCommittedResponseWrapper extends HttpServletResponseWrapper {
|
|||||||
/**
|
/**
|
||||||
* Invoke this method to disable invoking
|
* Invoke this method to disable invoking
|
||||||
* {@link OnCommittedResponseWrapper#onResponseCommitted()} when the
|
* {@link OnCommittedResponseWrapper#onResponseCommitted()} when the
|
||||||
* {@link javax.servlet.http.HttpServletResponse} is committed. This can be useful in
|
* {@link jakarta.servlet.http.HttpServletResponse} is committed. This can be useful
|
||||||
* the event that Async Web Requests are made.
|
* in the event that Async Web Requests are made.
|
||||||
*/
|
*/
|
||||||
private void disableOnResponseCommitted() {
|
private void disableOnResponseCommitted() {
|
||||||
this.disableOnCommitted = true;
|
this.disableOnCommitted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implement the logic for handling the {@link javax.servlet.http.HttpServletResponse}
|
* Implement the logic for handling the
|
||||||
* being committed.
|
* {@link jakarta.servlet.http.HttpServletResponse} being committed.
|
||||||
*/
|
*/
|
||||||
protected abstract void onResponseCommitted();
|
protected abstract void onResponseCommitted();
|
||||||
|
|
||||||
@@ -474,8 +474,9 @@ abstract class OnCommittedResponseWrapper extends HttpServletResponseWrapper {
|
|||||||
/**
|
/**
|
||||||
* Ensures{@link OnCommittedResponseWrapper#onResponseCommitted()} is invoked before
|
* Ensures{@link OnCommittedResponseWrapper#onResponseCommitted()} is invoked before
|
||||||
* calling methods that commit the response. We delegate all methods to the original
|
* calling methods that commit the response. We delegate all methods to the original
|
||||||
* {@link javax.servlet.ServletOutputStream} to ensure that the behavior is as close
|
* {@link jakarta.servlet.ServletOutputStream} to ensure that the behavior is as close
|
||||||
* to the original {@link javax.servlet.ServletOutputStream} as possible. See SEC-2039
|
* to the original {@link jakarta.servlet.ServletOutputStream} as possible. See
|
||||||
|
* SEC-2039
|
||||||
*
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -18,15 +18,15 @@ package org.springframework.session.web.http;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.DispatcherType;
|
import jakarta.servlet.DispatcherType;
|
||||||
import javax.servlet.Filter;
|
import jakarta.servlet.Filter;
|
||||||
import javax.servlet.FilterChain;
|
import jakarta.servlet.FilterChain;
|
||||||
import javax.servlet.FilterConfig;
|
import jakarta.servlet.FilterConfig;
|
||||||
import javax.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
import javax.servlet.ServletRequest;
|
import jakarta.servlet.ServletRequest;
|
||||||
import javax.servlet.ServletResponse;
|
import jakarta.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows for easily ensuring that a request is only invoked once per request. This is a
|
* Allows for easily ensuring that a request is only invoked once per request. This is a
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ package org.springframework.session.web.http;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
import jakarta.servlet.ServletContext;
|
||||||
import javax.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
import javax.servlet.http.HttpSessionEvent;
|
import jakarta.servlet.http.HttpSessionEvent;
|
||||||
import javax.servlet.http.HttpSessionListener;
|
import jakarta.servlet.http.HttpSessionListener;
|
||||||
|
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
import org.springframework.session.Session;
|
import org.springframework.session.Session;
|
||||||
@@ -79,9 +79,8 @@ public class SessionEventHttpSessionListenerAdapter
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see
|
* @see org.springframework.web.context.ServletContextAware#setServletContext(jakarta.
|
||||||
* org.springframework.web.context.ServletContextAware#setServletContext(javax.servlet
|
* servlet.ServletContext)
|
||||||
* .ServletContext)
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setServletContext(ServletContext servletContext) {
|
public void setServletContext(ServletContext servletContext) {
|
||||||
|
|||||||
@@ -20,16 +20,16 @@ import java.io.IOException;
|
|||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.FilterChain;
|
import jakarta.servlet.FilterChain;
|
||||||
import javax.servlet.RequestDispatcher;
|
import jakarta.servlet.RequestDispatcher;
|
||||||
import javax.servlet.ServletContext;
|
import jakarta.servlet.ServletContext;
|
||||||
import javax.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
import javax.servlet.ServletRequest;
|
import jakarta.servlet.ServletRequest;
|
||||||
import javax.servlet.ServletResponse;
|
import jakarta.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletRequestWrapper;
|
import jakarta.servlet.http.HttpServletRequestWrapper;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
@@ -39,29 +39,29 @@ import org.springframework.session.Session;
|
|||||||
import org.springframework.session.SessionRepository;
|
import org.springframework.session.SessionRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switches the {@link javax.servlet.http.HttpSession} implementation to be backed by a
|
* Switches the {@link jakarta.servlet.http.HttpSession} implementation to be backed by a
|
||||||
* {@link org.springframework.session.Session}.
|
* {@link org.springframework.session.Session}.
|
||||||
*
|
*
|
||||||
* The {@link SessionRepositoryFilter} wraps the
|
* The {@link SessionRepositoryFilter} wraps the
|
||||||
* {@link javax.servlet.http.HttpServletRequest} and overrides the methods to get an
|
* {@link jakarta.servlet.http.HttpServletRequest} and overrides the methods to get an
|
||||||
* {@link javax.servlet.http.HttpSession} to be backed by a
|
* {@link jakarta.servlet.http.HttpSession} to be backed by a
|
||||||
* {@link org.springframework.session.Session} returned by the
|
* {@link org.springframework.session.Session} returned by the
|
||||||
* {@link org.springframework.session.SessionRepository}.
|
* {@link org.springframework.session.SessionRepository}.
|
||||||
*
|
*
|
||||||
* The {@link SessionRepositoryFilter} uses a {@link HttpSessionIdResolver} (default
|
* The {@link SessionRepositoryFilter} uses a {@link HttpSessionIdResolver} (default
|
||||||
* {@link CookieHttpSessionIdResolver}) to bridge logic between an
|
* {@link CookieHttpSessionIdResolver}) to bridge logic between an
|
||||||
* {@link javax.servlet.http.HttpSession} and the
|
* {@link jakarta.servlet.http.HttpSession} and the
|
||||||
* {@link org.springframework.session.Session} abstraction. Specifically:
|
* {@link org.springframework.session.Session} abstraction. Specifically:
|
||||||
*
|
*
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>The session id is looked up using
|
* <li>The session id is looked up using
|
||||||
* {@link HttpSessionIdResolver#resolveSessionIds(javax.servlet.http.HttpServletRequest)}
|
* {@link HttpSessionIdResolver#resolveSessionIds(jakarta.servlet.http.HttpServletRequest)}
|
||||||
* . The default is to look in a cookie named SESSION.</li>
|
* . The default is to look in a cookie named SESSION.</li>
|
||||||
* <li>The session id of newly created {@link org.springframework.session.Session} is sent
|
* <li>The session id of newly created {@link org.springframework.session.Session} is sent
|
||||||
* to the client using
|
* to the client using
|
||||||
* {@link HttpSessionIdResolver#setSessionId(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, String)}
|
* {@link HttpSessionIdResolver#setSessionId(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, String)}
|
||||||
* <li>The client is notified that the session id is no longer valid with
|
* <li>The client is notified that the session id is no longer valid with
|
||||||
* {@link HttpSessionIdResolver#expireSession(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}
|
* {@link HttpSessionIdResolver#expireSession(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)}
|
||||||
* </li>
|
* </li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
@@ -183,8 +183,8 @@ public class SessionRepositoryFilter<S extends Session> extends OncePerRequestFi
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link javax.servlet.http.HttpServletRequest} that retrieves the
|
* A {@link jakarta.servlet.http.HttpServletRequest} that retrieves the
|
||||||
* {@link javax.servlet.http.HttpSession} using a
|
* {@link jakarta.servlet.http.HttpSession} using a
|
||||||
* {@link org.springframework.session.SessionRepository}.
|
* {@link org.springframework.session.SessionRepository}.
|
||||||
*
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import java.util.EnumSet;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
import org.springframework.http.server.ServerHttpRequest;
|
import org.springframework.http.server.ServerHttpRequest;
|
||||||
import org.springframework.http.server.ServerHttpResponse;
|
import org.springframework.http.server.ServerHttpResponse;
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ package org.springframework.session.config.annotation.web.http;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
import javax.servlet.ServletRequest;
|
import jakarta.servlet.ServletRequest;
|
||||||
import javax.servlet.ServletResponse;
|
import jakarta.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package org.springframework.session.config.annotation.web.http;
|
|||||||
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
import jakarta.servlet.ServletContext;
|
||||||
|
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
package org.springframework.session.security.web.authentication;
|
package org.springframework.session.security.web.authentication;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ package org.springframework.session.web.http;
|
|||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
import javax.servlet.http.Cookie;
|
import jakarta.servlet.http.Cookie;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import java.time.ZonedDateTime;
|
|||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
import javax.servlet.http.Cookie;
|
import jakarta.servlet.http.Cookie;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ import java.io.PrintWriter;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import javax.servlet.ServletOutputStream;
|
import jakarta.servlet.ServletOutputStream;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014-2019 the original author or authors.
|
* Copyright 2014-2021 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -20,12 +20,12 @@ import java.io.IOException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.DispatcherType;
|
import jakarta.servlet.DispatcherType;
|
||||||
import javax.servlet.FilterChain;
|
import jakarta.servlet.FilterChain;
|
||||||
import javax.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServlet;
|
import jakarta.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014-2019 the original author or authors.
|
* Copyright 2014-2021 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -19,9 +19,9 @@ package org.springframework.session.web.http;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
import jakarta.servlet.ServletContext;
|
||||||
import javax.servlet.http.HttpSessionEvent;
|
import jakarta.servlet.http.HttpSessionEvent;
|
||||||
import javax.servlet.http.HttpSessionListener;
|
import jakarta.servlet.http.HttpSessionListener;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|||||||
@@ -30,17 +30,17 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
import javax.servlet.FilterChain;
|
import jakarta.servlet.FilterChain;
|
||||||
import javax.servlet.ServletContext;
|
import jakarta.servlet.ServletContext;
|
||||||
import javax.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
import javax.servlet.http.Cookie;
|
import jakarta.servlet.http.Cookie;
|
||||||
import javax.servlet.http.HttpServlet;
|
import jakarta.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
import javax.servlet.http.HttpSessionBindingEvent;
|
import jakarta.servlet.http.HttpSessionBindingEvent;
|
||||||
import javax.servlet.http.HttpSessionBindingListener;
|
import jakarta.servlet.http.HttpSessionBindingListener;
|
||||||
import javax.servlet.http.HttpSessionContext;
|
import jakarta.servlet.http.HttpSessionContext;
|
||||||
|
|
||||||
import org.assertj.core.data.Offset;
|
import org.assertj.core.data.Offset;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|||||||
@@ -41,5 +41,5 @@ dependencies {
|
|||||||
testImplementation "org.mockito:mockito-core"
|
testImplementation "org.mockito:mockito-core"
|
||||||
testImplementation "org.mockito:mockito-junit-jupiter"
|
testImplementation "org.mockito:mockito-junit-jupiter"
|
||||||
testImplementation "io.projectreactor:reactor-test"
|
testImplementation "io.projectreactor:reactor-test"
|
||||||
testImplementation "javax.servlet:javax.servlet-api"
|
testImplementation "jakarta.servlet:jakarta.servlet-api"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ dependencies {
|
|||||||
testImplementation "org.mockito:mockito-core"
|
testImplementation "org.mockito:mockito-core"
|
||||||
testImplementation "org.springframework:spring-test"
|
testImplementation "org.springframework:spring-test"
|
||||||
testImplementation "io.projectreactor:reactor-test"
|
testImplementation "io.projectreactor:reactor-test"
|
||||||
testImplementation "javax.servlet:javax.servlet-api"
|
testImplementation "jakarta.servlet:jakarta.servlet-api"
|
||||||
testImplementation "org.springframework:spring-web"
|
testImplementation "org.springframework:spring-web"
|
||||||
testImplementation "org.springframework.security:spring-security-core"
|
testImplementation "org.springframework.security:spring-security-core"
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ package docs.security;
|
|||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
import javax.servlet.http.Cookie;
|
import jakarta.servlet.http.Cookie;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ package docs.security;
|
|||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
import javax.servlet.http.Cookie;
|
import jakarta.servlet.http.Cookie;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ dependencies {
|
|||||||
testImplementation 'org.assertj:assertj-core'
|
testImplementation 'org.assertj:assertj-core'
|
||||||
testImplementation 'com.hazelcast:hazelcast'
|
testImplementation 'com.hazelcast:hazelcast'
|
||||||
testImplementation 'io.lettuce:lettuce-core'
|
testImplementation 'io.lettuce:lettuce-core'
|
||||||
testImplementation 'javax.servlet:javax.servlet-api'
|
testImplementation 'jakarta.annotation:jakarta.annotation-api'
|
||||||
|
testImplementation 'jakarta.servlet:jakarta.servlet-api'
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
||||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ package docs.security;
|
|||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
import javax.servlet.http.Cookie;
|
import jakarta.servlet.http.Cookie;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ package docs.security;
|
|||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
import javax.servlet.http.Cookie;
|
import jakarta.servlet.http.Cookie;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ configurations {
|
|||||||
dependencies {
|
dependencies {
|
||||||
api project(':spring-session-core')
|
api project(':spring-session-core')
|
||||||
api "com.hazelcast:hazelcast"
|
api "com.hazelcast:hazelcast"
|
||||||
api "javax.annotation:javax.annotation-api"
|
api "jakarta.annotation:jakarta.annotation-api"
|
||||||
api "org.springframework:spring-context"
|
api "org.springframework:spring-context"
|
||||||
|
|
||||||
hazelcast4(project(path: ":hazelcast4", configuration: 'classesOnlyElements'))
|
hazelcast4(project(path: ":hazelcast4", configuration: 'classesOnlyElements'))
|
||||||
compileOnly(project(":hazelcast4"))
|
compileOnly(project(":hazelcast4"))
|
||||||
|
|
||||||
testImplementation "javax.servlet:javax.servlet-api"
|
testImplementation "jakarta.servlet:jakarta.servlet-api"
|
||||||
testImplementation "org.assertj:assertj-core"
|
testImplementation "org.assertj:assertj-core"
|
||||||
testImplementation "org.mockito:mockito-core"
|
testImplementation "org.mockito:mockito-core"
|
||||||
testImplementation "org.springframework:spring-test"
|
testImplementation "org.springframework:spring-test"
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import jakarta.annotation.PostConstruct;
|
||||||
import javax.annotation.PreDestroy;
|
import jakarta.annotation.PreDestroy;
|
||||||
|
|
||||||
import com.hazelcast.core.EntryEvent;
|
import com.hazelcast.core.EntryEvent;
|
||||||
import com.hazelcast.core.HazelcastInstance;
|
import com.hazelcast.core.HazelcastInstance;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ dependencies {
|
|||||||
api "org.springframework:spring-context"
|
api "org.springframework:spring-context"
|
||||||
api "org.springframework:spring-jdbc"
|
api "org.springframework:spring-jdbc"
|
||||||
|
|
||||||
testImplementation "javax.servlet:javax.servlet-api"
|
testImplementation "jakarta.servlet:jakarta.servlet-api"
|
||||||
testImplementation "org.assertj:assertj-core"
|
testImplementation "org.assertj:assertj-core"
|
||||||
testImplementation "org.mockito:mockito-core"
|
testImplementation "org.mockito:mockito-core"
|
||||||
testImplementation "org.springframework:spring-test"
|
testImplementation "org.springframework:spring-test"
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ dependencyManagement {
|
|||||||
dependencies {
|
dependencies {
|
||||||
dependency 'ch.qos.logback:logback-classic:1.2.6'
|
dependency 'ch.qos.logback:logback-classic:1.2.6'
|
||||||
dependency 'com.maxmind.geoip2:geoip2:2.15.0'
|
dependency 'com.maxmind.geoip2:geoip2:2.15.0'
|
||||||
dependency 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.2'
|
dependency 'jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:2.0.0'
|
||||||
dependency 'javax.servlet.jsp:javax.servlet.jsp-api:2.3.3'
|
dependency 'jakarta.servlet.jsp:jakarta.servlet.jsp-api:3.0.0'
|
||||||
dependency 'org.apache.taglibs:taglibs-standard-jstlel:1.2.5'
|
dependency 'org.glassfish.web:jakarta.servlet.jsp.jstl:2.0.0'
|
||||||
dependency 'org.seleniumhq.selenium:htmlunit-driver:2.52.0'
|
dependency 'org.seleniumhq.selenium:htmlunit-driver:2.52.0'
|
||||||
dependency 'org.slf4j:jcl-over-slf4j:1.7.32'
|
dependency 'org.slf4j:jcl-over-slf4j:1.7.32'
|
||||||
dependency 'org.slf4j:log4j-over-slf4j:1.7.32'
|
dependency 'org.slf4j:log4j-over-slf4j:1.7.32'
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ package sample.data;
|
|||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import javax.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
public class ActiveWebSocketUser {
|
public class ActiveWebSocketUser {
|
||||||
|
|||||||
@@ -9,15 +9,14 @@ dependencies {
|
|||||||
implementation "io.lettuce:lettuce-core"
|
implementation "io.lettuce:lettuce-core"
|
||||||
implementation "org.webjars:bootstrap"
|
implementation "org.webjars:bootstrap"
|
||||||
implementation "org.webjars:webjars-taglib"
|
implementation "org.webjars:webjars-taglib"
|
||||||
implementation "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api"
|
|
||||||
implementation "org.apache.taglibs:taglibs-standard-jstlel"
|
|
||||||
implementation "org.slf4j:slf4j-api"
|
implementation "org.slf4j:slf4j-api"
|
||||||
implementation "org.slf4j:jcl-over-slf4j"
|
implementation "org.slf4j:jcl-over-slf4j"
|
||||||
implementation "org.slf4j:log4j-over-slf4j"
|
implementation "org.slf4j:log4j-over-slf4j"
|
||||||
implementation "ch.qos.logback:logback-classic"
|
implementation "ch.qos.logback:logback-classic"
|
||||||
implementation "org.testcontainers:testcontainers"
|
implementation "org.testcontainers:testcontainers"
|
||||||
|
|
||||||
providedCompile "javax.servlet:javax.servlet-api"
|
providedCompile "jakarta.servlet:jakarta.servlet-api"
|
||||||
|
providedCompile "org.glassfish.web:jakarta.servlet.jsp.jstl"
|
||||||
|
|
||||||
testImplementation "org.assertj:assertj-core"
|
testImplementation "org.assertj:assertj-core"
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ package sample;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.annotation.WebServlet;
|
import jakarta.servlet.annotation.WebServlet;
|
||||||
import javax.servlet.http.HttpServlet;
|
import jakarta.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
// tag::class[]
|
// tag::class[]
|
||||||
@WebServlet("/session")
|
@WebServlet("/session")
|
||||||
|
|||||||
@@ -12,15 +12,14 @@ dependencies {
|
|||||||
implementation "org.webjars:bootstrap"
|
implementation "org.webjars:bootstrap"
|
||||||
implementation "org.webjars:webjars-taglib"
|
implementation "org.webjars:webjars-taglib"
|
||||||
implementation "com.hazelcast:hazelcast-client"
|
implementation "com.hazelcast:hazelcast-client"
|
||||||
implementation "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api"
|
|
||||||
implementation "org.apache.taglibs:taglibs-standard-jstlel"
|
|
||||||
implementation "org.slf4j:slf4j-api"
|
implementation "org.slf4j:slf4j-api"
|
||||||
implementation "org.slf4j:jcl-over-slf4j"
|
implementation "org.slf4j:jcl-over-slf4j"
|
||||||
implementation "org.slf4j:log4j-over-slf4j"
|
implementation "org.slf4j:log4j-over-slf4j"
|
||||||
implementation "ch.qos.logback:logback-classic"
|
implementation "ch.qos.logback:logback-classic"
|
||||||
|
|
||||||
providedCompile "javax.servlet:javax.servlet-api"
|
providedCompile "jakarta.servlet:jakarta.servlet-api"
|
||||||
providedCompile "javax.servlet.jsp:javax.servlet.jsp-api"
|
providedCompile "jakarta.servlet.jsp:jakarta.servlet.jsp-api"
|
||||||
|
providedCompile "org.glassfish.web:jakarta.servlet.jsp.jstl"
|
||||||
|
|
||||||
testImplementation "org.assertj:assertj-core"
|
testImplementation "org.assertj:assertj-core"
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ package sample;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.annotation.WebServlet;
|
import jakarta.servlet.annotation.WebServlet;
|
||||||
import javax.servlet.http.HttpServlet;
|
import jakarta.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
@WebServlet("/session")
|
@WebServlet("/session")
|
||||||
public class SessionServlet extends HttpServlet {
|
public class SessionServlet extends HttpServlet {
|
||||||
|
|||||||
@@ -9,14 +9,13 @@ dependencies {
|
|||||||
implementation "org.webjars:bootstrap"
|
implementation "org.webjars:bootstrap"
|
||||||
implementation "org.webjars:webjars-taglib"
|
implementation "org.webjars:webjars-taglib"
|
||||||
implementation "com.h2database:h2"
|
implementation "com.h2database:h2"
|
||||||
implementation "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api"
|
|
||||||
implementation "org.apache.taglibs:taglibs-standard-jstlel"
|
|
||||||
implementation "org.slf4j:slf4j-api"
|
implementation "org.slf4j:slf4j-api"
|
||||||
implementation "org.slf4j:jcl-over-slf4j"
|
implementation "org.slf4j:jcl-over-slf4j"
|
||||||
implementation "org.slf4j:log4j-over-slf4j"
|
implementation "org.slf4j:log4j-over-slf4j"
|
||||||
implementation "ch.qos.logback:logback-classic"
|
implementation "ch.qos.logback:logback-classic"
|
||||||
|
|
||||||
providedCompile "javax.servlet:javax.servlet-api"
|
providedCompile "jakarta.servlet:jakarta.servlet-api"
|
||||||
|
providedCompile "org.glassfish.web:jakarta.servlet.jsp.jstl"
|
||||||
|
|
||||||
testImplementation "org.assertj:assertj-core"
|
testImplementation "org.assertj:assertj-core"
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ package sample;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.annotation.WebServlet;
|
import jakarta.servlet.annotation.WebServlet;
|
||||||
import javax.servlet.http.HttpServlet;
|
import jakarta.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
// tag::class[]
|
// tag::class[]
|
||||||
@WebServlet("/session")
|
@WebServlet("/session")
|
||||||
|
|||||||
@@ -9,15 +9,14 @@ dependencies {
|
|||||||
implementation "io.lettuce:lettuce-core"
|
implementation "io.lettuce:lettuce-core"
|
||||||
implementation "org.webjars:bootstrap"
|
implementation "org.webjars:bootstrap"
|
||||||
implementation "org.webjars:webjars-taglib"
|
implementation "org.webjars:webjars-taglib"
|
||||||
implementation "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api"
|
|
||||||
implementation "org.apache.taglibs:taglibs-standard-jstlel"
|
|
||||||
implementation "org.slf4j:slf4j-api"
|
implementation "org.slf4j:slf4j-api"
|
||||||
implementation "org.slf4j:jcl-over-slf4j"
|
implementation "org.slf4j:jcl-over-slf4j"
|
||||||
implementation "org.slf4j:log4j-over-slf4j"
|
implementation "org.slf4j:log4j-over-slf4j"
|
||||||
implementation "ch.qos.logback:logback-classic"
|
implementation "ch.qos.logback:logback-classic"
|
||||||
implementation "org.testcontainers:testcontainers"
|
implementation "org.testcontainers:testcontainers"
|
||||||
|
|
||||||
providedCompile "javax.servlet:javax.servlet-api"
|
providedCompile "jakarta.servlet:jakarta.servlet-api"
|
||||||
|
providedCompile "org.glassfish.web:jakarta.servlet.jsp.jstl"
|
||||||
|
|
||||||
testImplementation "org.assertj:assertj-core"
|
testImplementation "org.assertj:assertj-core"
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ package sample;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.annotation.WebServlet;
|
import jakarta.servlet.annotation.WebServlet;
|
||||||
import javax.servlet.http.HttpServlet;
|
import jakarta.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
// tag::class[]
|
// tag::class[]
|
||||||
@WebServlet("/session")
|
@WebServlet("/session")
|
||||||
|
|||||||
@@ -10,15 +10,13 @@ dependencies {
|
|||||||
implementation "org.springframework.security:spring-security-config"
|
implementation "org.springframework.security:spring-security-config"
|
||||||
implementation "org.springframework.security:spring-security-web"
|
implementation "org.springframework.security:spring-security-web"
|
||||||
implementation "com.fasterxml.jackson.core:jackson-databind"
|
implementation "com.fasterxml.jackson.core:jackson-databind"
|
||||||
implementation "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api"
|
|
||||||
implementation "org.apache.taglibs:taglibs-standard-jstlel"
|
|
||||||
implementation "org.slf4j:slf4j-api"
|
implementation "org.slf4j:slf4j-api"
|
||||||
implementation "org.slf4j:jcl-over-slf4j"
|
implementation "org.slf4j:jcl-over-slf4j"
|
||||||
implementation "org.slf4j:log4j-over-slf4j"
|
implementation "org.slf4j:log4j-over-slf4j"
|
||||||
implementation "ch.qos.logback:logback-classic"
|
implementation "ch.qos.logback:logback-classic"
|
||||||
implementation "org.testcontainers:testcontainers"
|
implementation "org.testcontainers:testcontainers"
|
||||||
|
|
||||||
providedCompile "javax.servlet:javax.servlet-api"
|
providedCompile "jakarta.servlet:jakarta.servlet-api"
|
||||||
|
|
||||||
testImplementation "org.springframework.security:spring-security-test"
|
testImplementation "org.springframework.security:spring-security-test"
|
||||||
testImplementation "org.assertj:assertj-core"
|
testImplementation "org.assertj:assertj-core"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import java.security.Principal;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|||||||
@@ -11,16 +11,15 @@ dependencies {
|
|||||||
implementation "io.lettuce:lettuce-core"
|
implementation "io.lettuce:lettuce-core"
|
||||||
implementation "org.webjars:bootstrap"
|
implementation "org.webjars:bootstrap"
|
||||||
implementation "org.webjars:webjars-taglib"
|
implementation "org.webjars:webjars-taglib"
|
||||||
implementation "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api"
|
|
||||||
implementation "org.apache.taglibs:taglibs-standard-jstlel"
|
|
||||||
implementation "org.slf4j:slf4j-api"
|
implementation "org.slf4j:slf4j-api"
|
||||||
implementation "org.slf4j:jcl-over-slf4j"
|
implementation "org.slf4j:jcl-over-slf4j"
|
||||||
implementation "org.slf4j:log4j-over-slf4j"
|
implementation "org.slf4j:log4j-over-slf4j"
|
||||||
implementation "ch.qos.logback:logback-classic"
|
implementation "ch.qos.logback:logback-classic"
|
||||||
implementation "org.testcontainers:testcontainers"
|
implementation "org.testcontainers:testcontainers"
|
||||||
|
|
||||||
providedCompile "javax.servlet:javax.servlet-api"
|
providedCompile "jakarta.servlet:jakarta.servlet-api"
|
||||||
providedCompile "javax.servlet.jsp:javax.servlet.jsp-api"
|
providedCompile "jakarta.servlet.jsp:jakarta.servlet.jsp-api"
|
||||||
|
providedCompile "org.glassfish.web:jakarta.servlet.jsp.jstl"
|
||||||
|
|
||||||
testImplementation "org.assertj:assertj-core"
|
testImplementation "org.assertj:assertj-core"
|
||||||
testImplementation "org.springframework:spring-test"
|
testImplementation "org.springframework:spring-test"
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ package sample;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.annotation.WebServlet;
|
import jakarta.servlet.annotation.WebServlet;
|
||||||
import javax.servlet.http.HttpServlet;
|
import jakarta.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
@WebServlet("/session")
|
@WebServlet("/session")
|
||||||
public class SessionServlet extends HttpServlet {
|
public class SessionServlet extends HttpServlet {
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ dependencies {
|
|||||||
implementation "org.webjars:bootstrap"
|
implementation "org.webjars:bootstrap"
|
||||||
implementation "org.webjars:webjars-taglib"
|
implementation "org.webjars:webjars-taglib"
|
||||||
implementation "com.hazelcast:hazelcast-client"
|
implementation "com.hazelcast:hazelcast-client"
|
||||||
implementation "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api"
|
implementation "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api"
|
||||||
implementation "org.apache.taglibs:taglibs-standard-jstlel"
|
implementation "org.apache.taglibs:taglibs-standard-jstlel"
|
||||||
implementation "org.slf4j:slf4j-api"
|
implementation "org.slf4j:slf4j-api"
|
||||||
implementation "org.slf4j:jcl-over-slf4j"
|
implementation "org.slf4j:jcl-over-slf4j"
|
||||||
implementation "org.slf4j:log4j-over-slf4j"
|
implementation "org.slf4j:log4j-over-slf4j"
|
||||||
implementation "ch.qos.logback:logback-classic"
|
implementation "ch.qos.logback:logback-classic"
|
||||||
|
|
||||||
providedCompile "javax.servlet:javax.servlet-api"
|
providedCompile "jakarta.servlet:jakarta.servlet-api"
|
||||||
|
|
||||||
testImplementation "org.assertj:assertj-core"
|
testImplementation "org.assertj:assertj-core"
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
||||||
|
|||||||
@@ -19,11 +19,11 @@ package sample;
|
|||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.DispatcherType;
|
import jakarta.servlet.DispatcherType;
|
||||||
import javax.servlet.FilterRegistration.Dynamic;
|
import jakarta.servlet.FilterRegistration.Dynamic;
|
||||||
import javax.servlet.ServletContextEvent;
|
import jakarta.servlet.ServletContextEvent;
|
||||||
import javax.servlet.ServletContextListener;
|
import jakarta.servlet.ServletContextListener;
|
||||||
import javax.servlet.annotation.WebListener;
|
import jakarta.servlet.annotation.WebListener;
|
||||||
|
|
||||||
import com.hazelcast.config.Config;
|
import com.hazelcast.config.Config;
|
||||||
import com.hazelcast.config.NetworkConfig;
|
import com.hazelcast.config.NetworkConfig;
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ package sample;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.annotation.WebServlet;
|
import jakarta.servlet.annotation.WebServlet;
|
||||||
import javax.servlet.http.HttpServlet;
|
import jakarta.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
|
|||||||
@@ -9,14 +9,13 @@ dependencies {
|
|||||||
implementation "org.webjars:bootstrap"
|
implementation "org.webjars:bootstrap"
|
||||||
implementation "org.webjars:webjars-taglib"
|
implementation "org.webjars:webjars-taglib"
|
||||||
implementation "com.h2database:h2"
|
implementation "com.h2database:h2"
|
||||||
implementation "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api"
|
|
||||||
implementation "org.apache.taglibs:taglibs-standard-jstlel"
|
|
||||||
implementation "org.slf4j:slf4j-api"
|
implementation "org.slf4j:slf4j-api"
|
||||||
implementation "org.slf4j:jcl-over-slf4j"
|
implementation "org.slf4j:jcl-over-slf4j"
|
||||||
implementation "org.slf4j:log4j-over-slf4j"
|
implementation "org.slf4j:log4j-over-slf4j"
|
||||||
implementation "ch.qos.logback:logback-classic"
|
implementation "ch.qos.logback:logback-classic"
|
||||||
|
|
||||||
providedCompile "javax.servlet:javax.servlet-api"
|
providedCompile "jakarta.servlet:jakarta.servlet-api"
|
||||||
|
providedCompile "org.glassfish.web:jakarta.servlet.jsp.jstl"
|
||||||
|
|
||||||
testImplementation "org.assertj:assertj-core"
|
testImplementation "org.assertj:assertj-core"
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ package sample;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServlet;
|
import jakarta.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
// tag::class[]
|
// tag::class[]
|
||||||
public class SessionServlet extends HttpServlet {
|
public class SessionServlet extends HttpServlet {
|
||||||
|
|||||||
@@ -9,15 +9,14 @@ dependencies {
|
|||||||
implementation "io.lettuce:lettuce-core"
|
implementation "io.lettuce:lettuce-core"
|
||||||
implementation "org.webjars:bootstrap"
|
implementation "org.webjars:bootstrap"
|
||||||
implementation "org.webjars:webjars-taglib"
|
implementation "org.webjars:webjars-taglib"
|
||||||
implementation "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api"
|
|
||||||
implementation "org.apache.taglibs:taglibs-standard-jstlel"
|
|
||||||
implementation "org.slf4j:slf4j-api"
|
implementation "org.slf4j:slf4j-api"
|
||||||
implementation "org.slf4j:jcl-over-slf4j"
|
implementation "org.slf4j:jcl-over-slf4j"
|
||||||
implementation "org.slf4j:log4j-over-slf4j"
|
implementation "org.slf4j:log4j-over-slf4j"
|
||||||
implementation "ch.qos.logback:logback-classic"
|
implementation "ch.qos.logback:logback-classic"
|
||||||
implementation "org.testcontainers:testcontainers"
|
implementation "org.testcontainers:testcontainers"
|
||||||
|
|
||||||
providedCompile "javax.servlet:javax.servlet-api"
|
providedCompile "jakarta.servlet:jakarta.servlet-api"
|
||||||
|
providedCompile "org.glassfish.web:jakarta.servlet.jsp.jstl"
|
||||||
|
|
||||||
testImplementation "org.assertj:assertj-core"
|
testImplementation "org.assertj:assertj-core"
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ package sample;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServlet;
|
import jakarta.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
// tag::class[]
|
// tag::class[]
|
||||||
public class SessionServlet extends HttpServlet {
|
public class SessionServlet extends HttpServlet {
|
||||||
|
|||||||
Reference in New Issue
Block a user