Merge branch 'master' of gitee.com:mindskip/xzs-mysql
This commit is contained in:
commit
adb674d5ed
@ -3,7 +3,7 @@ package com.mindskip.xzs.configuration.property;
|
|||||||
public class CookieConfig {
|
public class CookieConfig {
|
||||||
|
|
||||||
public static String getName() {
|
public static String getName() {
|
||||||
return "exam";
|
return "xzs";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Integer getInterval() {
|
public static Integer getInterval() {
|
||||||
|
@ -29,26 +29,6 @@ import java.time.Duration;
|
|||||||
@EnableCaching
|
@EnableCaching
|
||||||
public class CacheConfig extends CachingConfigurerSupport {
|
public class CacheConfig extends CachingConfigurerSupport {
|
||||||
|
|
||||||
/* @Autowired
|
|
||||||
private CacheProperties cacheProperties;*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* redis序列化修改为ObjectMapper
|
|
||||||
*
|
|
||||||
* @return RedisCacheConfiguration
|
|
||||||
*/
|
|
||||||
/* @Bean
|
|
||||||
public RedisCacheConfiguration redisCacheConfiguration() {
|
|
||||||
Jackson2JsonRedisSerializer<Object> serializer = new Jackson2JsonRedisSerializer<Object>(Object.class);
|
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
|
||||||
objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
|
|
||||||
objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
|
|
||||||
serializer.setObjectMapper(objectMapper);
|
|
||||||
return RedisCacheConfiguration.defaultCacheConfig().entryTtl(cacheProperties.getRedis().getTimeToLive())
|
|
||||||
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(serializer));
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* spring boot redis默认序列化方式
|
* spring boot redis默认序列化方式
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user