eureka
tanghc 5 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> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.alibaba.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency> </dependency>
<!-- easyopen starter --> <!-- easyopen starter -->
@ -58,6 +59,18 @@
<artifactId>spring-boot-starter-thymeleaf</artifactId> <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency> </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> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>

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

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

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

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

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

Loading…
Cancel
Save