mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-12 07:02:14 +08:00
Merge branch 'master' into registry-nacos
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
* [首页](/?t=1565681110217)
|
||||
* [首页](/?t=1565767132305)
|
||||
* 开发文档
|
||||
* [快速体验](files/10010_快速体验.md?t=1565681110219)
|
||||
* [项目接入到SOP](files/10011_项目接入到SOP.md?t=1565681110236)
|
||||
* [新增接口](files/10020_新增接口.md?t=1565681110236)
|
||||
* [业务参数校验](files/10030_业务参数校验.md?t=1565681110236)
|
||||
* [错误处理](files/10040_错误处理.md?t=1565681110236)
|
||||
* [编写文档](files/10041_编写文档.md?t=1565681110236)
|
||||
* [接口交互详解](files/10050_接口交互详解.md?t=1565681110236)
|
||||
* [easyopen支持](files/10070_easyopen支持.md?t=1565681110236)
|
||||
* [使用签名校验工具](files/10080_使用签名校验工具.md?t=1565681110237)
|
||||
* [ISV管理](files/10085_ISV管理.md?t=1565681110237)
|
||||
* [自定义路由](files/10086_自定义路由.md?t=1565681110237)
|
||||
* [自定义返回结果](files/10087_自定义返回结果.md?t=1565681110237)
|
||||
* [自定义过滤器](files/10088_自定义过滤器.md?t=1565681110237)
|
||||
* [路由授权](files/10090_路由授权.md?t=1565681110237)
|
||||
* [接口限流](files/10092_接口限流.md?t=1565681110237)
|
||||
* [监控日志](files/10093_监控日志.md?t=1565681110237)
|
||||
* [SDK开发](files/10095_SDK开发.md?t=1565681110237)
|
||||
* [使用SpringCloudGateway](files/10096_使用SpringCloudGateway.md?t=1565681110237)
|
||||
* [应用授权](files/10097_应用授权.md?t=1565681110238)
|
||||
* [传统web开发](files/10100_传统web开发.md?t=1565681110238)
|
||||
* [文件上传](files/10104_文件上传.md?t=1565681110238)
|
||||
* [nacos注册中心](files/10106_nacos注册中心.md?t=1565681110238)
|
||||
* [扩展其它注册中心](files/10107_扩展其它注册中心.md?t=1565681110238)
|
||||
* [配置Sleuth链路追踪](files/10109_配置Sleuth链路追踪.md?t=1565681110238)
|
||||
* [预发布灰度发布](files/10110_预发布灰度发布.md?t=1565681110238)
|
||||
* [动态修改请求参数](files/10111_动态修改请求参数.md?t=1565681110238)
|
||||
* [快速体验](files/10010_快速体验.md?t=1565767132307)
|
||||
* [项目接入到SOP](files/10011_项目接入到SOP.md?t=1565767132325)
|
||||
* [新增接口](files/10020_新增接口.md?t=1565767132325)
|
||||
* [业务参数校验](files/10030_业务参数校验.md?t=1565767132325)
|
||||
* [错误处理](files/10040_错误处理.md?t=1565767132325)
|
||||
* [编写文档](files/10041_编写文档.md?t=1565767132326)
|
||||
* [接口交互详解](files/10050_接口交互详解.md?t=1565767132326)
|
||||
* [easyopen支持](files/10070_easyopen支持.md?t=1565767132326)
|
||||
* [使用签名校验工具](files/10080_使用签名校验工具.md?t=1565767132326)
|
||||
* [ISV管理](files/10085_ISV管理.md?t=1565767132326)
|
||||
* [自定义路由](files/10086_自定义路由.md?t=1565767132326)
|
||||
* [自定义返回结果](files/10087_自定义返回结果.md?t=1565767132326)
|
||||
* [自定义过滤器](files/10088_自定义过滤器.md?t=1565767132326)
|
||||
* [路由授权](files/10090_路由授权.md?t=1565767132326)
|
||||
* [接口限流](files/10092_接口限流.md?t=1565767132326)
|
||||
* [监控日志](files/10093_监控日志.md?t=1565767132327)
|
||||
* [SDK开发](files/10095_SDK开发.md?t=1565767132327)
|
||||
* [使用SpringCloudGateway](files/10096_使用SpringCloudGateway.md?t=1565767132327)
|
||||
* [应用授权](files/10097_应用授权.md?t=1565767132327)
|
||||
* [传统web开发](files/10100_传统web开发.md?t=1565767132327)
|
||||
* [文件上传](files/10104_文件上传.md?t=1565767132327)
|
||||
* [nacos注册中心](files/10106_nacos注册中心.md?t=1565767132327)
|
||||
* [扩展其它注册中心](files/10107_扩展其它注册中心.md?t=1565767132327)
|
||||
* [配置Sleuth链路追踪](files/10109_配置Sleuth链路追踪.md?t=1565767132327)
|
||||
* [预发布灰度发布](files/10110_预发布灰度发布.md?t=1565767132327)
|
||||
* [动态修改请求参数](files/10111_动态修改请求参数.md?t=1565767132327)
|
||||
* 原理分析
|
||||
* [原理分析之@ApiMapping](files/90010_原理分析之@ApiMapping.md?t=1565681110238)
|
||||
* [原理分析之路由存储](files/90011_原理分析之路由存储.md?t=1565681110238)
|
||||
* [原理分析之如何路由](files/90012_原理分析之如何路由.md?t=1565681110238)
|
||||
* [原理分析之文档归纳](files/90013_原理分析之文档归纳.md?t=1565681110239)
|
||||
* [常见问题](files/90100_常见问题.md?t=1565681110239)
|
||||
* [原理分析之@ApiMapping](files/90010_原理分析之@ApiMapping.md?t=1565767132328)
|
||||
* [原理分析之路由存储](files/90011_原理分析之路由存储.md?t=1565767132328)
|
||||
* [原理分析之如何路由](files/90012_原理分析之如何路由.md?t=1565767132328)
|
||||
* [原理分析之文档归纳](files/90013_原理分析之文档归纳.md?t=1565767132328)
|
||||
* [常见问题](files/90100_常见问题.md?t=1565767132328)
|
||||
|
@@ -2,13 +2,29 @@
|
||||
|
||||
以springboot项目为例,springmvc目前暂不支持,以后可以支持。
|
||||
|
||||
- 工程依赖sop-service-common,和eureka
|
||||
- pom.xml添加SpringCloud支持
|
||||
|
||||
```xml
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>Greenwich.RELEASE</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
```
|
||||
|
||||
- pom.xml依赖sop-service-common和eureka
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>com.gitee.sop</groupId>
|
||||
<artifactId>sop-service-common</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>最新版本</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -17,15 +33,16 @@
|
||||
</dependency>
|
||||
```
|
||||
|
||||
- 配置文件添加eureka配置
|
||||
- application.properties配置文件添加
|
||||
|
||||
```yaml
|
||||
eureka:
|
||||
port: 1111 # eureka端口号
|
||||
host: localhost # eureka地址
|
||||
client:
|
||||
serviceUrl:
|
||||
defaultZone: http://${eureka.host}:${eureka.port}/eureka/
|
||||
```properties
|
||||
server.port=2222
|
||||
# 服务名称
|
||||
spring.application.name=story-service
|
||||
# eureka注册中心
|
||||
eureka.client.serviceUrl.defaultZone=http://localhost:1111/eureka/
|
||||
# zookeeper配置
|
||||
spring.cloud.zookeeper.connect-string=localhost:2181
|
||||
```
|
||||
|
||||
- 在springboot启动类上添加`@EnableDiscoveryClient`
|
||||
|
Reference in New Issue
Block a user