diff --git a/README.md b/README.md index 2e7afd2b..da66708a 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,6 @@ SOP封装了开放平台大部分功能包括:签名验证、统一异常处 - 应用授权 - 监控日志 -## 后期规划 - -- 调试工具 ## admin界面预览 diff --git a/changelog.md b/changelog.md index c7b21f49..89035399 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,10 @@ # changelog +## 1.12.0 + +- admin后台新增角色管理 +- 支持nacos作为注册中心 + ## 1.11.0 - 秘钥管理改造 diff --git a/doc/docs/_sidebar.md b/doc/docs/_sidebar.md index 63118b5d..5a51e16b 100644 --- a/doc/docs/_sidebar.md +++ b/doc/docs/_sidebar.md @@ -1,30 +1,31 @@ -* [首页](/?t=1561970396914) +* [首页](/?t=1561975674071) * 开发文档 - * [快速体验](files/10010_快速体验.md?t=1561970396914) - * [项目接入到SOP](files/10011_项目接入到SOP.md?t=1561970396931) - * [新增接口](files/10020_新增接口.md?t=1561970396931) - * [业务参数校验](files/10030_业务参数校验.md?t=1561970396931) - * [错误处理](files/10040_错误处理.md?t=1561970396931) - * [编写文档](files/10041_编写文档.md?t=1561970396931) - * [接口交互详解](files/10050_接口交互详解.md?t=1561970396931) - * [easyopen支持](files/10070_easyopen支持.md?t=1561970396932) - * [使用签名校验工具](files/10080_使用签名校验工具.md?t=1561970396932) - * [ISV管理](files/10085_ISV管理.md?t=1561970396932) - * [自定义路由](files/10086_自定义路由.md?t=1561970396932) - * [路由授权](files/10090_路由授权.md?t=1561970396932) - * [接口限流](files/10092_接口限流.md?t=1561970396932) - * [监控日志](files/10093_监控日志.md?t=1561970396932) - * [SDK开发](files/10095_SDK开发.md?t=1561970396932) - * [使用SpringCloudGateway](files/10096_使用SpringCloudGateway.md?t=1561970396932) - * [应用授权](files/10097_应用授权.md?t=1561970396932) - * [更改数据节点名称](files/10099_更改数据节点名称.md?t=1561970396932) - * [对接前端](files/10100_对接前端.md?t=1561970396933) - * [自定义过滤器](files/10102_自定义过滤器.md?t=1561970396933) - * [文件上传](files/10104_文件上传.md?t=1561970396933) - * [nacos注册中心](files/10106_nacos注册中心.md?t=1561970396933) + * [快速体验](files/10010_快速体验.md?t=1561975674073) + * [项目接入到SOP](files/10011_项目接入到SOP.md?t=1561975674089) + * [新增接口](files/10020_新增接口.md?t=1561975674089) + * [业务参数校验](files/10030_业务参数校验.md?t=1561975674090) + * [错误处理](files/10040_错误处理.md?t=1561975674090) + * [编写文档](files/10041_编写文档.md?t=1561975674090) + * [接口交互详解](files/10050_接口交互详解.md?t=1561975674090) + * [easyopen支持](files/10070_easyopen支持.md?t=1561975674090) + * [使用签名校验工具](files/10080_使用签名校验工具.md?t=1561975674090) + * [ISV管理](files/10085_ISV管理.md?t=1561975674090) + * [自定义路由](files/10086_自定义路由.md?t=1561975674090) + * [路由授权](files/10090_路由授权.md?t=1561975674090) + * [接口限流](files/10092_接口限流.md?t=1561975674090) + * [监控日志](files/10093_监控日志.md?t=1561975674091) + * [SDK开发](files/10095_SDK开发.md?t=1561975674091) + * [使用SpringCloudGateway](files/10096_使用SpringCloudGateway.md?t=1561975674091) + * [应用授权](files/10097_应用授权.md?t=1561975674091) + * [更改数据节点名称](files/10099_更改数据节点名称.md?t=1561975674091) + * [对接前端](files/10100_对接前端.md?t=1561975674091) + * [自定义过滤器](files/10102_自定义过滤器.md?t=1561975674091) + * [文件上传](files/10104_文件上传.md?t=1561975674091) + * [nacos注册中心](files/10106_nacos注册中心.md?t=1561975674091) + * [扩展其它注册中心](files/10107_扩展其它注册中心.md?t=1561975674091) * 原理分析 - * [原理分析之@ApiMapping](files/90010_原理分析之@ApiMapping.md?t=1561970396933) - * [原理分析之路由存储](files/90011_原理分析之路由存储.md?t=1561970396933) - * [原理分析之如何路由](files/90012_原理分析之如何路由.md?t=1561970396933) - * [原理分析之文档归纳](files/90013_原理分析之文档归纳.md?t=1561970396933) - * [常见问题](files/90100_常见问题.md?t=1561970396933) + * [原理分析之@ApiMapping](files/90010_原理分析之@ApiMapping.md?t=1561975674092) + * [原理分析之路由存储](files/90011_原理分析之路由存储.md?t=1561975674092) + * [原理分析之如何路由](files/90012_原理分析之如何路由.md?t=1561975674092) + * [原理分析之文档归纳](files/90013_原理分析之文档归纳.md?t=1561975674092) + * [常见问题](files/90100_常见问题.md?t=1561975674092) diff --git a/doc/docs/files/10106_nacos注册中心.md b/doc/docs/files/10106_nacos注册中心.md index a06a4f5a..bf396475 100644 --- a/doc/docs/files/10106_nacos注册中心.md +++ b/doc/docs/files/10106_nacos注册中心.md @@ -1,55 +1,28 @@ # nacos注册中心 -完整代码在`registry-nacos`分支 +使用nacos作为注册中心,步骤如下: -SOP默认使用eureka注册中心,如果要换成nacos注册中心,步骤如下: +- 准备工作 -- 实现`com.gitee.sop.registryapi.service.RegistryService`接口 +1.安装nacos,前往[最新稳定版本](https://github.com/alibaba/nacos/releases),下载最新版nacos -1.找到`SOP/sop-common/sop-registry-api`工程,在service.impl包下新建一个类,实现RegistryService接口 +2.启动nacos服务器,cd nacos/bin -```java -public class RegistryServiceNacos implements RegistryService { - - @Override - public List listAllService(int pageNo, int pageSize) throws Exception { - // TODO: 返回服务实例 - } +Linux/Unix/Mac,启动命令(standalone代表着单机模式运行,非集群模式): - @Override - public void onlineInstance(ServiceInstance serviceInstance) throws Exception { - // TODO: 实例上线 - } +`sh startup.sh -m standalone` - @Override - public void offlineInstance(ServiceInstance serviceInstance) throws Exception { - // TODO: 实例下线 - } -} -``` +Windows,启动命令: -2.在`com.gitee.sop.registryapi.config.BaseRegistryConfig`中新增 - -```java -/** - * 当配置了registry.name=nacos生效 - * - * @return - */ -@Bean -@ConditionalOnProperty(prefix = "registry", name = "name", havingValue = "nacos") -RegistryService registryServiceNacos() { - return new RegistryServiceNacos(); -} -``` +`cmd startup.cmd` -其中`@ConditionalOnProperty(prefix = "registry", name = "name", havingValue = "nacos")` -表示`application.properties`配置了`registry.name=nacos`参数才能生效,registry.name=nacos下文会讲到。 +或者双击startup.cmd运行文件。 +更多访问:https://nacos.io/zh-cn/docs/quick-start.html - 微服务端修改 -1.修改微服务应用pom.xml,注释eureka服务发现依赖,添加nacos服务发现依赖 +1.修改微服务应用pom,打开`sop-example/sop-story/sop-story-web/pom.xml`,注释eureka服务发现依赖,添加nacos服务发现依赖 ```xml @@ -90,15 +63,16 @@ spring: - SOP-admin修改 -修改yml文件,新增nacos服务器地址,`registry.name`填nacos +修改yml文件,设置nacos服务器地址,`registry.name`填nacos ```yaml # 注册中心地址,根据实际情况改,这里只是参数,并不会去注册 registry: - # 使用哪个配置中心,使用eureka,填eureka;使用nacos填nacos - name: nacos eureka-server-addr: http://localhost:1111/eureka/ + # nacos服务器地址 nacos-server-addr: 127.0.0.1:8848 + # 使用eureka,填:eureka,使用nacos填:nacos + name: nacos ``` - website-server修改 @@ -110,4 +84,5 @@ registry: - 参考资料 1.[nacos介绍及安装](https://nacos.io/zh-cn/docs/quick-start.html) + 2.[nacos spring cloud注册发现](https://nacos.io/zh-cn/docs/quick-start-spring-cloud.html) diff --git a/doc/docs/files/10107_扩展其它注册中心.md b/doc/docs/files/10107_扩展其它注册中心.md new file mode 100644 index 00000000..f52d701c --- /dev/null +++ b/doc/docs/files/10107_扩展其它注册中心.md @@ -0,0 +1,112 @@ +# 扩展其它注册中心 + +**注: nacos注册中心已经实现,本篇以nacos为例介绍如何扩展,如果要改成consul,可按照此方式进行修改** + +SOP默认使用eureka注册中心,如果要换成nacos注册中心,步骤如下: + +- 实现`com.gitee.sop.registryapi.service.RegistryService`接口 + +1.找到`SOP/sop-common/sop-registry-api`工程,在service.impl包下新建一个类,实现RegistryService接口 + +```java +public class RegistryServiceNacos implements RegistryService { + + @Override + public List listAllService(int pageNo, int pageSize) throws Exception { + // TODO: 返回服务实例 + } + + @Override + public void onlineInstance(ServiceInstance serviceInstance) throws Exception { + // TODO: 实例上线 + } + + @Override + public void offlineInstance(ServiceInstance serviceInstance) throws Exception { + // TODO: 实例下线 + } +} +``` + +2.在`com.gitee.sop.registryapi.config.BaseRegistryConfig`中新增 + +```java +/** + * 当配置了registry.name=nacos生效 + * + * @return + */ +@Bean +@ConditionalOnProperty(prefix = "registry", name = "name", havingValue = "nacos") +RegistryService registryServiceNacos() { + return new RegistryServiceNacos(); +} +``` + +其中`@ConditionalOnProperty(prefix = "registry", name = "name", havingValue = "nacos")` +表示`application.properties`配置了`registry.name=nacos`参数才能生效,registry.name=nacos下文会讲到。 + + +- 微服务端修改 + +1.修改微服务应用pom.xml,注释eureka服务发现依赖,添加nacos服务发现依赖 + +```xml + + + + + + org.springframework.cloud + spring-cloud-starter-alibaba-nacos-discovery + 0.2.2.RELEASE + + +``` + +2.yml文件新增nacos配置,并注释掉eureka相关配置 + +```yaml +spring: + cloud: + # nacos注册中心,和eureka只能用一个 + nacos: + discovery: + server-addr: 127.0.0.1:8848 +``` + +- 网关修改 + +找到`sop-gateway`工程,步骤同上 + +- SOP-admin修改 + + +修改yml文件,新增nacos服务器地址,`registry.name`填nacos + +```yaml +# 注册中心地址,根据实际情况改,这里只是参数,并不会去注册 +registry: + # 使用eureka,填:eureka,使用nacos填:nacos + name: nacos + eureka-server-addr: http://localhost:1111/eureka/ + nacos-server-addr: 127.0.0.1:8848 +``` + +- website-server修改 + +步骤同`SOP-admin修改` + +- 参考资料 + +1.[nacos介绍及安装](https://nacos.io/zh-cn/docs/quick-start.html) + +2.[nacos spring cloud注册发现](https://nacos.io/zh-cn/docs/quick-start-spring-cloud.html) diff --git a/sop-admin/sop-admin-server/pom.xml b/sop-admin/sop-admin-server/pom.xml index 97c43720..f3e41d94 100644 --- a/sop-admin/sop-admin-server/pom.xml +++ b/sop-admin/sop-admin-server/pom.xml @@ -30,7 +30,7 @@ com.gitee.sop sop-registry-api - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/SopAdminConstants.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/SopAdminConstants.java index 9f411a09..958a1977 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/SopAdminConstants.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/SopAdminConstants.java @@ -9,11 +9,6 @@ public class SopAdminConstants { */ public static final String SOP_SERVICE_ROUTE_PATH = "/com.gitee.sop.route"; - /** - * zookeeper存放路由授权信息根目录 - */ - public static final String SOP_ROUTE_PERMISSION_PATH = "/com.gitee.sop.isv.route.permission"; - /** * 消息监听路径 */ diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/ZookeeperContext.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/ZookeeperContext.java index 2f2ae540..c97e585e 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/ZookeeperContext.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/ZookeeperContext.java @@ -20,7 +20,6 @@ import java.util.Collections; import java.util.List; import static com.gitee.sop.adminserver.bean.SopAdminConstants.SOP_MSG_CHANNEL_PATH; -import static com.gitee.sop.adminserver.bean.SopAdminConstants.SOP_ROUTE_PERMISSION_PATH; /** * @author tanghc @@ -77,10 +76,6 @@ public class ZookeeperContext { return serviceIdPath + "/" + routeId; } - public static String getRoutePermissionPath() { - return SOP_ROUTE_PERMISSION_PATH; - } - public static String getIsvInfoChannelPath() { return SOP_MSG_CHANNEL_PATH + "/isvinfo"; } diff --git a/sop-admin/sop-admin-server/src/main/resources/application-dev.yml b/sop-admin/sop-admin-server/src/main/resources/application-dev.yml index af585325..64b56db8 100644 --- a/sop-admin/sop-admin-server/src/main/resources/application-dev.yml +++ b/sop-admin/sop-admin-server/src/main/resources/application-dev.yml @@ -35,9 +35,10 @@ easyopen: # 注册中心地址,根据实际情况改,这里只是参数,并不会去注册 registry: eureka-server-addr: http://localhost:1111/eureka/ + # nacos服务器地址 nacos-server-addr: 127.0.0.1:8848 - # 使用哪个配置中心,使用eureka,填eureka;使用nacos填nacos - name: nacos + # 使用eureka,填:eureka,使用nacos填:nacos + name: eureka # 根据实际情况改 diff --git a/sop-common/pom.xml b/sop-common/pom.xml index 3a5a7675..627e7d0d 100644 --- a/sop-common/pom.xml +++ b/sop-common/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.gitee.sop sop-common - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT pom diff --git a/sop-common/sop-gateway-common/pom.xml b/sop-common/sop-gateway-common/pom.xml index 72958b00..8532ebda 100644 --- a/sop-common/sop-gateway-common/pom.xml +++ b/sop-common/sop-gateway-common/pom.xml @@ -5,11 +5,11 @@ com.gitee.sop sop-common - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT ../pom.xml sop-gateway-common - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT jar sop-gateway-common diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/SopConstants.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/SopConstants.java index d97e921a..c0ba6457 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/SopConstants.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/SopConstants.java @@ -45,11 +45,6 @@ public class SopConstants { */ public static final String SOP_SERVICE_ROUTE_PATH = "/com.gitee.sop.route"; - /** - * zookeeper存放路由授权信息根目录 - */ - public static final String SOP_ROUTE_PERMISSION_PATH = "/com.gitee.sop.isv.route.permission"; - /** * 消息监听路径 */ diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/ZookeeperContext.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/ZookeeperContext.java index a72b0621..7507e653 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/ZookeeperContext.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/ZookeeperContext.java @@ -18,7 +18,6 @@ import java.util.List; import java.util.function.Consumer; import static com.gitee.sop.gatewaycommon.bean.SopConstants.SOP_MSG_CHANNEL_PATH; -import static com.gitee.sop.gatewaycommon.bean.SopConstants.SOP_ROUTE_PERMISSION_PATH; import static com.gitee.sop.gatewaycommon.bean.SopConstants.SOP_SERVICE_ROUTE_PATH; /** @@ -60,10 +59,6 @@ public class ZookeeperContext { return SOP_SERVICE_ROUTE_PATH; } - public static String getRoutePermissionPath() { - return SOP_ROUTE_PERMISSION_PATH; - } - public static String getIsvInfoChannelPath() { return SOP_MSG_CHANNEL_PATH + "/isvinfo"; } diff --git a/sop-common/sop-registry-api/pom.xml b/sop-common/sop-registry-api/pom.xml index 3a46bfea..83bd1dd1 100644 --- a/sop-common/sop-registry-api/pom.xml +++ b/sop-common/sop-registry-api/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.gitee.sop sop-registry-api - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT UTF-8 diff --git a/sop-common/sop-service-common/pom.xml b/sop-common/sop-service-common/pom.xml index 7d94da07..cda7acb7 100644 --- a/sop-common/sop-service-common/pom.xml +++ b/sop-common/sop-service-common/pom.xml @@ -6,11 +6,11 @@ com.gitee.sop sop-common - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT ../pom.xml sop-service-common - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT jar sop-service-common diff --git a/sop-example/sop-auth/pom.xml b/sop-example/sop-auth/pom.xml index b7252cce..c51520ed 100644 --- a/sop-example/sop-auth/pom.xml +++ b/sop-example/sop-auth/pom.xml @@ -26,7 +26,7 @@ com.gitee.sop sop-service-common - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT org.springframework.cloud diff --git a/sop-example/sop-book/sop-book-web/pom.xml b/sop-example/sop-book/sop-book-web/pom.xml index 60606be9..e0443e6b 100644 --- a/sop-example/sop-book/sop-book-web/pom.xml +++ b/sop-example/sop-book/sop-book-web/pom.xml @@ -24,7 +24,7 @@ com.gitee.sop sop-service-common - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT com.gitee.sop @@ -39,22 +39,23 @@ - org.springframework.cloud spring-cloud-starter-netflix-eureka-client - --> + + org.springframework.cloud spring-cloud-starter-alibaba-nacos-discovery 0.2.2.RELEASE + --> diff --git a/sop-example/sop-book/sop-book-web/src/main/resources/application-dev.yml b/sop-example/sop-book/sop-book-web/src/main/resources/application-dev.yml index 4f39516a..649fcf39 100644 --- a/sop-example/sop-book/sop-book-web/src/main/resources/application-dev.yml +++ b/sop-example/sop-book/sop-book-web/src/main/resources/application-dev.yml @@ -11,15 +11,15 @@ spring: connect-string: localhost:2181 # nacos注册中心,和eureka只能用一个 - nacos: - discovery: - server-addr: 127.0.0.1:8848 +# nacos: +# discovery: +# server-addr: 127.0.0.1:8848 # eureka注册中心,如果使用nacos注册中心,这里要注释掉 -#eureka: -# client: -# serviceUrl: -# defaultZone: http://localhost:1111/eureka/ +eureka: + client: + serviceUrl: + defaultZone: http://localhost:1111/eureka/ # dubbo consumer demo: diff --git a/sop-example/sop-easyopen/pom.xml b/sop-example/sop-easyopen/pom.xml index e7daadb3..f4bd1d23 100644 --- a/sop-example/sop-easyopen/pom.xml +++ b/sop-example/sop-easyopen/pom.xml @@ -29,7 +29,7 @@ com.gitee.sop sop-service-common - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT org.springframework.cloud diff --git a/sop-example/sop-springmvc/pom.xml b/sop-example/sop-springmvc/pom.xml index fa52325f..0aea2861 100644 --- a/sop-example/sop-springmvc/pom.xml +++ b/sop-example/sop-springmvc/pom.xml @@ -20,7 +20,7 @@ com.gitee.sop sop-service-common - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT diff --git a/sop-example/sop-story/sop-story-web/pom.xml b/sop-example/sop-story/sop-story-web/pom.xml index 003081e0..670cea0d 100644 --- a/sop-example/sop-story/sop-story-web/pom.xml +++ b/sop-example/sop-story/sop-story-web/pom.xml @@ -24,7 +24,7 @@ com.gitee.sop sop-service-common - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT com.gitee.sop @@ -33,22 +33,23 @@ - org.springframework.cloud spring-cloud-starter-netflix-eureka-client - --> + + org.springframework.cloud spring-cloud-starter-alibaba-nacos-discovery 0.2.2.RELEASE + --> diff --git a/sop-example/sop-story/sop-story-web/src/main/resources/application-dev.yml b/sop-example/sop-story/sop-story-web/src/main/resources/application-dev.yml index 62354b7a..59f250ab 100644 --- a/sop-example/sop-story/sop-story-web/src/main/resources/application-dev.yml +++ b/sop-example/sop-story/sop-story-web/src/main/resources/application-dev.yml @@ -11,15 +11,15 @@ spring: connect-string: localhost:2181 # nacos注册中心,和eureka只能用一个 - nacos: - discovery: - server-addr: 127.0.0.1:8848 +# nacos: +# discovery: +# server-addr: 127.0.0.1:8848 # eureka注册中心,如果使用nacos注册中心,这里要注释掉 -#eureka: -# client: -# serviceUrl: -# defaultZone: http://localhost:1111/eureka/ +eureka: + client: + serviceUrl: + defaultZone: http://localhost:1111/eureka/ # dubbo provider dubbo: diff --git a/sop-gateway/pom.xml b/sop-gateway/pom.xml index 78edce77..cef66f3a 100644 --- a/sop-gateway/pom.xml +++ b/sop-gateway/pom.xml @@ -23,7 +23,7 @@ com.gitee.sop sop-gateway-common - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT @@ -66,22 +66,23 @@ - org.springframework.cloud spring-cloud-starter-netflix-eureka-client - --> + + org.springframework.cloud spring-cloud-starter-alibaba-nacos-discovery 0.2.2.RELEASE + --> diff --git a/sop-website/website-server/pom.xml b/sop-website/website-server/pom.xml index 30464050..2e35282c 100644 --- a/sop-website/website-server/pom.xml +++ b/sop-website/website-server/pom.xml @@ -25,7 +25,7 @@ com.gitee.sop sop-registry-api - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT diff --git a/sop-website/website-server/src/main/resources/application-dev.yml b/sop-website/website-server/src/main/resources/application-dev.yml index d6181365..79f736b6 100644 --- a/sop-website/website-server/src/main/resources/application-dev.yml +++ b/sop-website/website-server/src/main/resources/application-dev.yml @@ -3,10 +3,11 @@ server: # 注册中心地址,根据实际情况改,这里只是参数,并不会去注册 registry: - # 使用哪个配置中心,使用eureka,填eureka;使用nacos填nacos - name: nacos eureka-server-addr: http://localhost:1111/eureka/ + # nacos服务器地址 nacos-server-addr: 127.0.0.1:8848 + # 使用eureka,填:eureka,使用nacos填:nacos + name: eureka spring: application: