Skip to content

Commit

Permalink
[Upgrade] 优化 AcpAdminDistributedLockAutoConfiguration 配置
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangbinhub committed Oct 8, 2019
1 parent 4fd55f1 commit 657ec8e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Import
import org.springframework.data.redis.connection.RedisConnection
import org.springframework.data.redis.core.RedisOperations
import org.springframework.data.redis.core.RedisTemplate
import pers.acp.admin.common.lock.RedisDistributedLock
import pers.acp.admin.common.lock.ZkDistributedLock
Expand All @@ -27,7 +27,7 @@ import pers.acp.spring.cloud.lock.DistributedLock
class AcpAdminDistributedLockAutoConfiguration {

@Bean
@ConditionalOnClass(RedisConnection::class)
@ConditionalOnClass(RedisOperations::class)
@ConditionalOnMissingBean(CuratorFramework::class)
fun redisDistributedLock(redisTemplate: RedisTemplate<Any, Any>): DistributedLock =
RedisDistributedLock(redisTemplate)
Expand Down

0 comments on commit 657ec8e

Please sign in to comment.