tanghc 5 years ago
parent 427ef6e24a
commit ae157e97a0
  1. 19
      doc/docs/files/10011_项目接入到SOP.md

@ -8,7 +8,7 @@
<dependency> <dependency>
<groupId>com.gitee.sop</groupId> <groupId>com.gitee.sop</groupId>
<artifactId>sop-service-common</artifactId> <artifactId>sop-service-common</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>最新版本</version>
</dependency> </dependency>
<dependency> <dependency>
@ -17,15 +17,16 @@
</dependency> </dependency>
``` ```
- 配置文件添加eureka配置 - 配置文件添加
```yaml ```properties
eureka: server.port=2222
port: 1111 # eureka端口号 # 服务名称
host: localhost # eureka地址 spring.application.name=story-service
client: # eureka注册中心
serviceUrl: eureka.client.serviceUrl.defaultZone=http://localhost:1111/eureka/
defaultZone: http://${eureka.host}:${eureka.port}/eureka/ # zookeeper配置
spring.cloud.zookeeper.connect-string=localhost:2181
``` ```
- 在springboot启动类上添加`@EnableDiscoveryClient` - 在springboot启动类上添加`@EnableDiscoveryClient`

Loading…
Cancel
Save