eureka
tanghc 4 years ago
parent 1245f830dd
commit ab658580ff
  1. 17
      sop-admin/sop-admin-server/pom.xml
  2. 5
      sop-common/sop-gateway-common/pom.xml
  3. 5
      sop-common/sop-service-common/pom.xml
  4. 6
      sop-example/sop-story/pom.xml
  5. 10
      sop-example/sop-story/src/main/resources/application-dev.properties
  6. 4
      sop-gateway/pom.xml

@ -21,9 +21,10 @@
</properties>
<dependencies>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<!-- easyopen starter -->
@ -57,6 +58,18 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!-- optional-->
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>

@ -48,6 +48,11 @@
<artifactId>spring-cloud-netflix-ribbon</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<!-- optional -->
<dependency>
<groupId>com.alibaba.cloud</groupId>

@ -36,6 +36,11 @@
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<!-- optional -->
<dependency>
<groupId>org.springframework</groupId>

@ -27,12 +27,10 @@
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- 使用nacos注册中心 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<!-- 注册中心end -->
<dependency>
<groupId>org.springframework.cloud</groupId>

@ -1,10 +1,10 @@
server.port=2222
spring.application.name=story-service
#server.servlet.context-path=/story-service
# 如果有context-path,必须配下面这句
#spring.cloud.nacos.discovery.metadata.server.servlet.context-path=${server.servlet.context-path}
# nacos注册中心
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
# eureka注册中心
eureka.client.serviceUrl.defaultZone=http://localhost:1111/eureka/
# 如果使用eureka,填eureka,使用nacos,填eureka
registry.name=eureka
# zipkin服务跟踪
#spring.zipkin.base-url=http://127.0.0.1:9411/

@ -38,8 +38,8 @@
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>

Loading…
Cancel
Save