mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish "Improve Spring Session auto-configuration tests"
See gh-11063
This commit is contained in:
parent
d8e3960631
commit
8a3502bdde
@ -27,6 +27,7 @@ import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.mongodb.core.MongoOperations;
|
||||
import org.springframework.session.SessionRepository;
|
||||
import org.springframework.session.data.mongo.MongoOperationsSessionRepository;
|
||||
import org.springframework.session.data.mongo.config.annotation.web.http.MongoHttpSessionConfiguration;
|
||||
|
||||
/**
|
||||
@ -36,7 +37,7 @@ import org.springframework.session.data.mongo.config.annotation.web.http.MongoHt
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(MongoHttpSessionConfiguration.class)
|
||||
@ConditionalOnClass({ MongoOperations.class, MongoOperationsSessionRepository.class })
|
||||
@ConditionalOnMissingBean(SessionRepository.class)
|
||||
@ConditionalOnBean(MongoOperations.class)
|
||||
@Conditional(ServletSessionCondition.class)
|
||||
|
Loading…
Reference in New Issue
Block a user