package com.kidgrow.authclient.config; import com.kidgrow.authclient.store.AuthDbTokenStore; import com.kidgrow.authclient.store.AuthJwtTokenStore; import com.kidgrow.authclient.store.AuthRedisTokenStore; import com.kidgrow.authclient.store.ResJwtTokenStore; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; /** * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020
* * @Description: Token 存储配置
* @Project:
* @CreateDate: Created in 2020/2/13 11:23
* @Author: liuke */ @Configuration public class TokenStoreConfig { @Configuration @ConditionalOnProperty(prefix = "kidgrow.oauth2.token.store", name = "type", havingValue = "db") @Import(AuthDbTokenStore.class) public class JdbcTokenConfig { } @Configuration @ConditionalOnProperty(prefix = "kidgrow.oauth2.token.store", name = "type", havingValue = "redis", matchIfMissing = true) @Import(AuthRedisTokenStore.class) public class RedisTokenConfig { } @Configuration @ConditionalOnProperty(prefix = "kidgrow.oauth2.token.store", name = "type", havingValue = "authJwt") @Import(AuthJwtTokenStore.class) public class AuthJwtTokenConfig { } @Configuration @ConditionalOnProperty(prefix = "kidgrow.oauth2.token.store", name = "type", havingValue = "resJwt") @Import(ResJwtTokenStore.class) public class ResJwtTokenConfig { } }