From 9b322713c1760747da5909e70d43151806b559ad Mon Sep 17 00:00:00 2001 From: miemieYaho Date: Wed, 11 Mar 2020 16:03:26 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8Dyml=E6=B2=A1=E6=9C=89?= =?UTF-8?q?redis=E7=9A=84=E9=85=8D=E7=BD=AE=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../starter/wxjava/mp/properties/WxMpProperties.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/properties/WxMpProperties.java b/spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/properties/WxMpProperties.java index 0dbca9e77..4a9bfbbfe 100644 --- a/spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/properties/WxMpProperties.java +++ b/spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/properties/WxMpProperties.java @@ -2,6 +2,7 @@ package com.binarywang.spring.starter.wxjava.mp.properties; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; import java.io.Serializable; @@ -42,7 +43,7 @@ public class WxMpProperties { /** * 存储策略, memory, redis. */ - private ConfigStorage configStorage = new ConfigStorage(); + private final ConfigStorage configStorage = new ConfigStorage(); @Data @@ -51,8 +52,8 @@ public class WxMpProperties { private StorageType type = memory; - private RedisProperties redis = new RedisProperties(); - + @NestedConfigurationProperty + private final RedisProperties redis = new RedisProperties(); } public enum StorageType {