mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fix SessionAutoConfiguration
ordering
This commit updates `SessionAutoConfiguration` to ensure it is processed after `MongoDataAutoConfiguration` and `MongoReactiveDataAutoConfiguration`, instead of `MongoAutoConfiguration` and `MongoReactiveAutoConfiguration`. This is required in order for MongoDB Session auto-configuration to work, since `MongoSessionConfiguration` and `MongoReactiveSessionConfiguration` are conditional on `MongoOperations` and `ReactiveMongoOperations` beans, respectively. Closes gh-11054
This commit is contained in:
parent
347f63c77d
commit
44eebcaff5
@ -31,13 +31,13 @@ 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.autoconfigure.data.mongo.MongoDataAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.mongo.MongoReactiveDataAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@ -64,8 +64,8 @@ import org.springframework.session.SessionRepository;
|
||||
@ConditionalOnWebApplication
|
||||
@EnableConfigurationProperties(SessionProperties.class)
|
||||
@AutoConfigureAfter({ DataSourceAutoConfiguration.class, HazelcastAutoConfiguration.class,
|
||||
JdbcTemplateAutoConfiguration.class, MongoAutoConfiguration.class,
|
||||
MongoReactiveAutoConfiguration.class, RedisAutoConfiguration.class,
|
||||
JdbcTemplateAutoConfiguration.class, MongoDataAutoConfiguration.class,
|
||||
MongoReactiveDataAutoConfiguration.class, RedisAutoConfiguration.class,
|
||||
RedisReactiveAutoConfiguration.class })
|
||||
@AutoConfigureBefore(HttpHandlerAutoConfiguration.class)
|
||||
public class SessionAutoConfiguration {
|
||||
|
Loading…
Reference in New Issue
Block a user