mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-23 09:49:01 +00:00
Move code from spring-boot-actuator to spring-boot-session
See gh-46139
This commit is contained in:
+3
-3
@@ -18,8 +18,6 @@ package org.springframework.boot.actuate.autoconfigure.session;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint;
|
||||
import org.springframework.boot.actuate.session.ReactiveSessionsEndpoint;
|
||||
import org.springframework.boot.actuate.session.SessionsEndpoint;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -27,6 +25,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
|
||||
import org.springframework.boot.session.actuate.endpoint.ReactiveSessionsEndpoint;
|
||||
import org.springframework.boot.session.actuate.endpoint.SessionsEndpoint;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.session.FindByIndexNameSessionRepository;
|
||||
@@ -42,7 +42,7 @@ import org.springframework.session.SessionRepository;
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@AutoConfiguration(afterName = "org.springframework.boot.session.autoconfigure.SessionAutoConfiguration")
|
||||
@ConditionalOnClass(Session.class)
|
||||
@ConditionalOnClass({ Session.class, SessionsEndpoint.class })
|
||||
@ConditionalOnAvailableEndpoint(SessionsEndpoint.class)
|
||||
public class SessionsEndpointAutoConfiguration {
|
||||
|
||||
|
||||
+2
-2
@@ -19,9 +19,9 @@ package org.springframework.boot.actuate.autoconfigure.session;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.session.ReactiveSessionsEndpoint;
|
||||
import org.springframework.boot.actuate.session.SessionsEndpoint;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.session.actuate.endpoint.ReactiveSessionsEndpoint;
|
||||
import org.springframework.boot.session.actuate.endpoint.SessionsEndpoint;
|
||||
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
|
||||
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.context.ShutdownEndpoint;
|
||||
import org.springframework.boot.actuate.docs.MockMvcEndpointDocumentationTests;
|
||||
import org.springframework.boot.actuate.session.SessionsEndpoint;
|
||||
import org.springframework.boot.session.actuate.endpoint.SessionsEndpoint;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
@@ -71,7 +71,6 @@ dependencies {
|
||||
optional("org.springframework.data:spring-data-rest-webmvc")
|
||||
optional("org.springframework.security:spring-security-core")
|
||||
optional("org.springframework.security:spring-security-web")
|
||||
optional("org.springframework.session:spring-session-core")
|
||||
|
||||
testFixturesImplementation(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
testFixturesImplementation(project(":spring-boot-project:spring-boot-http-converter"))
|
||||
|
||||
@@ -32,7 +32,9 @@ dependencies {
|
||||
|
||||
implementation(project(":spring-boot-project:spring-boot-web-server"))
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-actuator"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional("io.projectreactor:reactor-core")
|
||||
optional("jakarta.servlet:jakarta.servlet-api")
|
||||
optional("org.springframework.security:spring-security-web")
|
||||
|
||||
@@ -47,8 +49,11 @@ dependencies {
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tomcat"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-webflux"))
|
||||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot")))
|
||||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator")))
|
||||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-web-server")))
|
||||
testImplementation("net.minidev:json-smart")
|
||||
testImplementation("io.projectreactor:reactor-test")
|
||||
|
||||
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||
testRuntimeOnly("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
|
||||
}
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.session;
|
||||
package org.springframework.boot.session.actuate.endpoint;
|
||||
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.boot.actuate.endpoint.annotation.DeleteOperation;
|
||||
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
|
||||
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
|
||||
import org.springframework.boot.actuate.endpoint.annotation.Selector;
|
||||
import org.springframework.boot.actuate.session.SessionsDescriptor.SessionDescriptor;
|
||||
import org.springframework.boot.session.actuate.endpoint.SessionsDescriptor.SessionDescriptor;
|
||||
import org.springframework.session.ReactiveFindByIndexNameSessionRepository;
|
||||
import org.springframework.session.ReactiveSessionRepository;
|
||||
import org.springframework.session.Session;
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.session;
|
||||
package org.springframework.boot.session.actuate.endpoint;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.session;
|
||||
package org.springframework.boot.session.actuate.endpoint;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.boot.actuate.endpoint.annotation.DeleteOperation;
|
||||
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
|
||||
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
|
||||
import org.springframework.boot.actuate.endpoint.annotation.Selector;
|
||||
import org.springframework.boot.actuate.session.SessionsDescriptor.SessionDescriptor;
|
||||
import org.springframework.boot.session.actuate.endpoint.SessionsDescriptor.SessionDescriptor;
|
||||
import org.springframework.session.FindByIndexNameSessionRepository;
|
||||
import org.springframework.session.Session;
|
||||
import org.springframework.session.SessionRepository;
|
||||
+2
-2
@@ -15,6 +15,6 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Actuator support for Spring Session.
|
||||
* Actuator endpoint for Spring Session.
|
||||
*/
|
||||
package org.springframework.boot.actuate.session;
|
||||
package org.springframework.boot.session.actuate.endpoint;
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.session;
|
||||
package org.springframework.boot.session.actuate.endpoint;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Collections;
|
||||
@@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.test.StepVerifier;
|
||||
|
||||
import org.springframework.boot.actuate.session.SessionsDescriptor.SessionDescriptor;
|
||||
import org.springframework.boot.session.actuate.endpoint.SessionsDescriptor.SessionDescriptor;
|
||||
import org.springframework.session.MapSession;
|
||||
import org.springframework.session.ReactiveFindByIndexNameSessionRepository;
|
||||
import org.springframework.session.ReactiveSessionRepository;
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.session;
|
||||
package org.springframework.boot.session.actuate.endpoint;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
+2
-2
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.session;
|
||||
package org.springframework.boot.session.actuate.endpoint;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.session.SessionsDescriptor.SessionDescriptor;
|
||||
import org.springframework.boot.session.actuate.endpoint.SessionsDescriptor.SessionDescriptor;
|
||||
import org.springframework.session.FindByIndexNameSessionRepository;
|
||||
import org.springframework.session.MapSession;
|
||||
import org.springframework.session.Session;
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.session;
|
||||
package org.springframework.boot.session.actuate.endpoint;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
Reference in New Issue
Block a user