caixiaofeng 10 kuukautta sitten
vanhempi
commit
059fc1cded

+ 6 - 11
flow-common/flow-common-cache-starter/pom.xml

@@ -19,28 +19,23 @@
     </properties>
 
     <dependencies>
+        <!--cache-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-cache</artifactId>
+        </dependency>
         <!--jackson-->
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
             <optional>true</optional>
         </dependency>
-        <!--lombok-->
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-            <optional>true</optional>
-        </dependency>
-        <!--cache-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-cache</artifactId>
-        </dependency>
         <!--redis-->
         <dependency>
             <groupId>com.flow</groupId>
             <artifactId>flow-common-redis-starter</artifactId>
             <version>0.0.1-SNAPSHOT</version>
+            <optional>true</optional>
         </dependency>
     </dependencies>
 

+ 4 - 3
flow-common/flow-common-cache-starter/src/main/java/com/flow/common/cache/configure/CacheConfiguration.java

@@ -6,7 +6,8 @@ import com.fasterxml.jackson.annotation.PropertyAccessor;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
 import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
-import lombok.extern.slf4j.Slf4j;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.autoconfigure.cache.CacheProperties;
@@ -81,7 +82,7 @@ public class CacheConfiguration {
         om.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
         // om.setSerializationInclusion(JsonInclude.Include.NON_NULL);
         om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
-        om.activateDefaultTyping(LaissezFaireSubTypeValidator.instance ,ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.WRAPPER_ARRAY);
+        om.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.WRAPPER_ARRAY);
         om.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
         // om.registerModule(new JavaTimeModule());
         GenericJackson2JsonRedisSerializer genericJackson2JsonRedisSerializer = new GenericJackson2JsonRedisSerializer(om);
@@ -119,8 +120,8 @@ public class CacheConfiguration {
         return new RedisCacheErrorHandler();
     }
 
-    @Slf4j
     private static class RedisCacheErrorHandler extends SimpleCacheErrorHandler {
+        private static final Logger log = LoggerFactory.getLogger(RedisCacheErrorHandler.class);
 
         @Override
         public void handleCacheGetError(RuntimeException exception, Cache cache, Object key) {

+ 1 - 0
flow-common/flow-common-oauth2-starter/pom.xml

@@ -47,6 +47,7 @@
             <groupId>com.flow</groupId>
             <artifactId>flow-common-redis-starter</artifactId>
             <version>0.0.1-SNAPSHOT</version>
+            <optional>true</optional>
         </dependency>
     </dependencies>
 

+ 0 - 12
flow-common/flow-common-redis-starter/pom.xml

@@ -19,12 +19,6 @@
     </properties>
 
     <dependencies>
-        <!--core-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-            <optional>true</optional>
-        </dependency>
         <!--redis-->
         <dependency>
             <groupId>org.springframework.boot</groupId>
@@ -35,12 +29,6 @@
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-pool2</artifactId>
         </dependency>
-        <!--processor-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-configuration-processor</artifactId>
-            <optional>true</optional>
-        </dependency>
     </dependencies>
 
 </project>