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

@ -8,7 +8,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-service-common</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>最新版本</version>
</dependency>
<dependency>
@ -17,15 +17,16 @@
</dependency>
```
- 配置文件添加eureka配置
- 配置文件添加
```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`

Loading…
Cancel
Save