From baffc2bd369c90da6d3fab5146d0433eafd8186c Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期一, 19 九月 2022 01:02:07 +0800
Subject: [PATCH] 抒写文档

---
 service-user/src/main/java/com/java110/user/UserServiceApplicationStart.java |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/service-user/src/main/java/com/java110/user/UserServiceApplicationStart.java b/service-user/src/main/java/com/java110/user/UserServiceApplicationStart.java
index c4dc119..42905a1 100755
--- a/service-user/src/main/java/com/java110/user/UserServiceApplicationStart.java
+++ b/service-user/src/main/java/com/java110/user/UserServiceApplicationStart.java
@@ -2,12 +2,15 @@
 
 import com.java110.core.annotation.Java110CmdDiscovery;
 import com.java110.core.annotation.Java110ListenerDiscovery;
+import com.java110.core.trace.Java110RestTemplateInterceptor;
 import com.java110.core.client.RestTemplate;
 import com.java110.core.event.cmd.ServiceCmdEventPublishing;
 import com.java110.core.event.service.BusinessServiceDataFlowEventPublishing;
+import com.java110.doc.annotation.Java110CmdDocDiscovery;
+import com.java110.doc.registrar.ApiDocCmdPublishing;
 import com.java110.service.init.ServiceStartInit;
 import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import com.java110.core.log.LoggerFactory;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.web.client.RestTemplateBuilder;
@@ -18,6 +21,7 @@
 import org.springframework.context.annotation.Bean;
 import org.springframework.http.converter.StringHttpMessageConverter;
 
+import javax.annotation.Resource;
 import java.nio.charset.Charset;
 
 
@@ -41,14 +45,21 @@
         basePackages = {"com.java110.user.cmd"})
 @EnableFeignClients(basePackages = {"com.java110.intf.community","com.java110.intf.common","com.java110.intf.store",
         "com.java110.intf.fee","com.java110.intf.order"})
+
+// 鏂囨。
+@Java110CmdDocDiscovery(basePackages = {"com.java110.user.cmd"},cmdDocClass = ApiDocCmdPublishing.class)
 public class UserServiceApplicationStart {
 
     private static Logger logger = LoggerFactory.getLogger(UserServiceApplicationStart.class);
 
     private static final String LISTENER_PATH = "java110.UserService.listeners";
 
+    @Resource
+    private Java110RestTemplateInterceptor java110RestTemplateInterceptor;
+
     public static void main(String[] args) throws Exception {
         try {
+            ServiceStartInit.preInitSystemConfig();
             ApplicationContext context = SpringApplication.run(UserServiceApplicationStart.class, args);
             ServiceStartInit.initSystemConfig(context);
             //鍔犺浇涓氬姟渚﹀惉
@@ -68,6 +79,7 @@
     public RestTemplate restTemplate() {
         StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8"));
         RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build(RestTemplate.class);
+        restTemplate.getInterceptors().add(java110RestTemplateInterceptor);
         return restTemplate;
     }
 }
\ No newline at end of file

--
Gitblit v1.8.0