From 17865c9454af61096e39278adbbd6b453b65b786 Mon Sep 17 00:00:00 2001
From: haoxr <1490493387@qq.com>
Date: Sun, 3 Jan 2021 11:02:31 +0800
Subject: [PATCH] =?UTF-8?q?fix:=E7=A7=BB=E9=99=A4jackson=E5=BA=8F=E5=88=97?=
=?UTF-8?q?=E5=8C=96=E5=AF=BC=E8=87=B4=E7=A8=8B=E5=BA=8F=E6=8A=A5=E9=94=99?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 13 ++---
pom.xml | 26 ----------
youlai-common/common-redis/pom.xml | 16 ------
.../com/youlai/common/redis/RedisConfig.java | 49 ++-----------------
.../com/youlai/common/web/vo/CascaderVO.java | 8 ---
5 files changed, 12 insertions(+), 100 deletions(-)
diff --git a/README.md b/README.md
index d34b26a7f..bef217650 100644
--- a/README.md
+++ b/README.md
@@ -9,9 +9,7 @@ youlai-mall是集成当前最新主流技术一套开源的商城系统。整个
**线上地址:** [www.youlai.store](http://www.youlai.store)
-### 后台
-
-体验码,加我微信(微信号:haoxianrui)备注“体验”获取体验资格
+### 管理后台
![](https://i.loli.net/2021/01/02/7t9TlgCHSnam64E.png)
@@ -20,9 +18,7 @@ youlai-mall是集成当前最新主流技术一套开源的商城系统。整个
![](https://i.loli.net/2020/12/27/iLw3jEgVGQSf61F.png)
-### 小程序
-
-![](https://i.loli.net/2021/01/02/ZesKNr17FBUlWGE.jpg)
+### 微信小程序
![](https://i.loli.net/2021/01/02/OugrUpPVl9d5w14.png)
@@ -30,6 +26,11 @@ youlai-mall是集成当前最新主流技术一套开源的商城系统。整个
![](https://i.loli.net/2021/01/02/QDU9okJbvuVrxwc.png)
+
+**体验码,加我微信(微信号:haoxianrui)备注“体验”获取体验**
+
+![](https://i.loli.net/2021/01/02/ZesKNr17FBUlWGE.jpg)
+
## **项目结构**
``` lua
diff --git a/pom.xml b/pom.xml
index 31d3badb4..a9af530d4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,32 +103,6 @@
weixin-java-miniapp
${weixin-java-miniapp.version}
-
-
- org.hibernate
- hibernate-validator
- ${hibernate-validator.version}
-
-
-
-
- com.fasterxml.jackson.core
- jackson-databind
- ${jackson.version}
-
-
-
- com.fasterxml.jackson.core
- jackson-core
- ${jackson.version}
-
-
-
- com.fasterxml.jackson.core
- jackson-annotations
- ${jackson.version}
-
-
diff --git a/youlai-common/common-redis/pom.xml b/youlai-common/common-redis/pom.xml
index 3fb96320d..6323532d4 100644
--- a/youlai-common/common-redis/pom.xml
+++ b/youlai-common/common-redis/pom.xml
@@ -16,21 +16,5 @@
org.springframework.boot
spring-boot-starter-data-redis
-
-
-
- com.fasterxml.jackson.core
- jackson-databind
-
-
-
- com.fasterxml.jackson.core
- jackson-core
-
-
-
- com.fasterxml.jackson.core
- jackson-annotations
-
diff --git a/youlai-common/common-redis/src/main/java/com/youlai/common/redis/RedisConfig.java b/youlai-common/common-redis/src/main/java/com/youlai/common/redis/RedisConfig.java
index 4d16f42f7..af6e9b631 100644
--- a/youlai-common/common-redis/src/main/java/com/youlai/common/redis/RedisConfig.java
+++ b/youlai-common/common-redis/src/main/java/com/youlai/common/redis/RedisConfig.java
@@ -1,63 +1,24 @@
package com.youlai.common.redis;
-import com.fasterxml.jackson.annotation.JsonAutoDetect;
-import com.fasterxml.jackson.annotation.PropertyAccessor;
-import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
@Configuration
public class RedisConfig {
@Bean
public RedisTemplate redisTemplate(RedisConnectionFactory factory) {
-// RedisTemplate redisTemplate = new RedisTemplate<>();
-// redisTemplate.setKeySerializer(new StringRedisSerializer());
-// redisTemplate.setValueSerializer(new JdkSerializationRedisSerializer());
-// redisTemplate.setHashKeySerializer(new StringRedisSerializer());
-// redisTemplate.setHashValueSerializer(new JdkSerializationRedisSerializer());
-// redisTemplate.setConnectionFactory(factory);
-// redisTemplate.afterPropertiesSet();
-// return redisTemplate;
-
RedisTemplate redisTemplate = new RedisTemplate<>();
+ redisTemplate.setKeySerializer(new StringRedisSerializer());
+ redisTemplate.setValueSerializer(new JdkSerializationRedisSerializer());
+ redisTemplate.setHashKeySerializer(new StringRedisSerializer());
+ redisTemplate.setHashValueSerializer(new JdkSerializationRedisSerializer());
redisTemplate.setConnectionFactory(factory);
- // 用Jackson2JsonRedisSerializer来序列化和反序列化redis的value值
- redisTemplate.setValueSerializer(serializer());
-
- StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
- // 使用StringRedisSerializer来序列化和反序列化redis的key值
- redisTemplate.setKeySerializer(stringRedisSerializer);
-
- // hash的key也采用String的序列化方式
- redisTemplate.setHashKeySerializer(stringRedisSerializer);
- // hash的value序列化方式采用jackson
- redisTemplate.setHashValueSerializer(serializer());
redisTemplate.afterPropertiesSet();
return redisTemplate;
}
-
- /**
- * 配置Jackson2JsonRedisSerializer序列化策略
- * */
- private Jackson2JsonRedisSerializer