Skip to content

Commit

Permalink
Improve RedisSessionConfiguration conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
vpavic authored and snicoll committed Mar 15, 2017
1 parent f72e0c0 commit 17aad4f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.
Expand All @@ -23,6 +23,7 @@

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
Expand All @@ -38,10 +39,12 @@
* @author Tommy Ludwig
* @author Eddú Meléndez
* @author Stephane Nicoll
* @author Vedran Pavic
*/
@Configuration
@ConditionalOnClass(RedisTemplate.class)
@ConditionalOnMissingBean(SessionRepository.class)
@ConditionalOnBean({ RedisTemplate.class, RedisConnectionFactory.class })
@ConditionalOnBean(RedisConnectionFactory.class)
@Conditional(SessionCondition.class)
class RedisSessionConfiguration {

Expand Down

0 comments on commit 17aad4f

Please sign in to comment.