feat: gateway增加统一鉴权功能
This commit is contained in:
-1
@@ -9,7 +9,6 @@ import org.springframework.cache.CacheManager;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.data.redis.cache.RedisCacheConfiguration;
|
||||
import org.springframework.data.redis.cache.RedisCacheManager;
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.central.common.redis.component;
|
||||
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import org.redisson.codec.JsonJacksonCodec;
|
||||
import org.redisson.config.Config;
|
||||
import org.redisson.spring.starter.RedissonAutoConfigurationCustomizer;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author: zlt
|
||||
* @date: 2023/11/21
|
||||
* <p>
|
||||
* Blog: https://zlt2000.gitee.io
|
||||
* Github: https://github.com/zlt2000
|
||||
*/
|
||||
@Component
|
||||
public class RedissonAutoConfigCustomizers implements RedissonAutoConfigurationCustomizer {
|
||||
@Override
|
||||
public void customize(Config configuration) {
|
||||
JsonJacksonCodec jacksonCodec = new JsonJacksonCodec();
|
||||
jacksonCodec.getObjectMapper().registerModule(new JavaTimeModule());
|
||||
configuration.setCodec(jacksonCodec);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user