Browse Source

Polish 'Order SessionRepositoryCustomizer before other customizers'

See gh-33514
pull/33918/head
Phillip Webb 3 years ago
parent
commit
e05b7e49c6
  1. 3
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/JdbcSessionConfiguration.java
  2. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationJdbcTests.java

3
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/JdbcSessionConfiguration.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -79,7 +79,6 @@ class JdbcSessionConfiguration { @@ -79,7 +79,6 @@ class JdbcSessionConfiguration {
map.from(jdbcSessionProperties::getSaveMode).to(sessionRepository::setSaveMode);
map.from(jdbcSessionProperties::getCleanupCron).to(sessionRepository::setCleanupCron);
};
}
static class OnJdbcSessionDatasourceInitializationCondition extends OnDatabaseInitializationCondition {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationJdbcTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -252,7 +252,6 @@ class SessionAutoConfigurationJdbcTests extends AbstractSessionAutoConfiguration @@ -252,7 +252,6 @@ class SessionAutoConfigurationJdbcTests extends AbstractSessionAutoConfiguration
ON CONFLICT (SESSION_PRIMARY_ID, ATTRIBUTE_NAME)
DO UPDATE SET ATTRIBUTE_BYTES = EXCLUDED.ATTRIBUTE_BYTES
""";
this.contextRunner.withUserConfiguration(CustomJdbcIndexedSessionRepositoryCustomizerConfiguration.class)
.withConfiguration(AutoConfigurations.of(JdbcSessionConfiguration.class)).run((context) -> {
JdbcIndexedSessionRepository repository = validateSessionRepository(context,

Loading…
Cancel
Save