diff --git a/pig-common/pig-common-core/pom.xml b/pig-common/pig-common-core/pom.xml
index 296f2703..44230135 100755
--- a/pig-common/pig-common-core/pom.xml
+++ b/pig-common/pig-common-core/pom.xml
@@ -61,5 +61,9 @@
spring-webmvc
provided
+
+ org.springframework.cloud
+ spring-cloud-commons
+
diff --git a/pig-common/pig-common-core/src/main/java/com/pig4cloud/pig/common/core/config/RestTemplateConfiguration.java b/pig-common/pig-common-core/src/main/java/com/pig4cloud/pig/common/core/config/RestTemplateConfiguration.java
index 39f5e994..a72eb8d6 100755
--- a/pig-common/pig-common-core/src/main/java/com/pig4cloud/pig/common/core/config/RestTemplateConfiguration.java
+++ b/pig-common/pig-common-core/src/main/java/com/pig4cloud/pig/common/core/config/RestTemplateConfiguration.java
@@ -17,6 +17,8 @@
package com.pig4cloud.pig.common.core.config;
import org.springframework.boot.autoconfigure.AutoConfiguration;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
@@ -27,7 +29,13 @@ import org.springframework.web.client.RestTemplate;
@AutoConfiguration
public class RestTemplateConfiguration {
+ /**
+ * 动态 REST 模板
+ * @return {@link RestTemplate }
+ */
@Bean
+ @LoadBalanced
+ @ConditionalOnProperty(value = "spring.cloud.nacos.discovery.enabled", havingValue = "true", matchIfMissing = true)
public RestTemplate restTemplate() {
return new RestTemplate();
}
diff --git a/pig-common/pig-common-excel/src/main/java/com/pig4cloud/pig/common/excel/ExcelAutoConfiguration.java b/pig-common/pig-common-excel/src/main/java/com/pig4cloud/pig/common/excel/ExcelAutoConfiguration.java
index 1cdac4bf..fce7ae2e 100644
--- a/pig-common/pig-common-excel/src/main/java/com/pig4cloud/pig/common/excel/ExcelAutoConfiguration.java
+++ b/pig-common/pig-common-excel/src/main/java/com/pig4cloud/pig/common/excel/ExcelAutoConfiguration.java
@@ -16,6 +16,16 @@ import org.springframework.web.client.RestTemplate;
@AutoConfiguration
public class ExcelAutoConfiguration {
+ /**
+ * REST 模板
+ * @return {@link RestTemplate }
+ */
+ @Bean
+ @ConditionalOnMissingBean
+ public RestTemplate restTemplate() {
+ return new RestTemplate();
+ }
+
/**
* dict 数据提供程序
* @param restTemplate REST 模板
diff --git a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/vo/UserExcelVO.java b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/vo/UserExcelVO.java
index d897a1b1..0cd3b038 100644
--- a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/vo/UserExcelVO.java
+++ b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/vo/UserExcelVO.java
@@ -96,7 +96,7 @@ public class UserExcelVO implements Serializable {
* 锁定标记
*/
@ExcelProperty("锁定标记,0:正常,9:已锁定")
- @DictTypeProperty("lock_flagX")
+ @DictTypeProperty("lock_flag")
private String lockFlag;
/**