From 4b2cd6894bfd054b5bf589cb0d8e5d6b0bc03801 Mon Sep 17 00:00:00 2001 From: zzh <2441574824@qq.com> Date: Sun, 4 Aug 2024 20:58:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0nacosServer=E4=B8=9A=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bwie/nacos/service/NacosRemoteConfig.java | 22 +++++++++++++++++++ ...ot.autoconfigure.AutoConfiguration.imports | 1 + 2 files changed, 23 insertions(+) create mode 100644 src/main/java/com/bwie/nacos/service/NacosRemoteConfig.java diff --git a/src/main/java/com/bwie/nacos/service/NacosRemoteConfig.java b/src/main/java/com/bwie/nacos/service/NacosRemoteConfig.java new file mode 100644 index 0000000..b714325 --- /dev/null +++ b/src/main/java/com/bwie/nacos/service/NacosRemoteConfig.java @@ -0,0 +1,22 @@ +package com.bwie.nacos.service; + +import com.bwie.nacos.remote.NacosServiceRemote; +import com.bwie.nacos.remote.interceptor.NacosNamespaceInterceptor; +import com.dtflys.forest.springboot.annotation.ForestScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; + +/** + * @Author:zhangzhihao + * @name:NacosRemoteConfig + * @Date:2024/8/4 20:44 + * 不准抄代码,添加注释,清楚每一行代码意思 + */ +@Configuration +@ForestScan(basePackages = "com.bwie.nacos.remote") +@Import(value = { + NacosNamespaceInterceptor.class, + NacosServiceRemote.class +}) +public class NacosRemoteConfig { +} diff --git a/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 94a0eec..67dd7be 100644 --- a/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,2 +1,3 @@ com.bwie.nacos.remote.interceptor.NacosNamespaceInterceptor com.bwie.nacos.remote.service.NacosServeService +com.bwie.nacos.service.NacosRemoteConfig