“Eureka Client 演示”的版本间的差异
跳到导航
跳到搜索
Jihongchang(讨论 | 贡献) (建立内容为“1”的新页面) |
Jihongchang(讨论 | 贡献) |
||
第1行: | 第1行: | ||
− | 1 | + | https://www.bilibili.com/video/BV1eU4y187zE/?p=11 |
+ | |||
+ | Eureka Client 可以向 Eureka Server 中注册自己 | ||
+ | |||
+ | === 导入依赖 === | ||
+ | 注意依赖换成了 Eureka 客户端依赖<syntaxhighlight lang="xml"> | ||
+ | <parent> | ||
+ | <groupId>org.springframework.boot</groupId> | ||
+ | <artifactId>spring-boot-starter-parent</artifactId> | ||
+ | <version>2.2.5.RELEASE</version> | ||
+ | </parent> | ||
+ | |||
+ | <groupId>io.github.jihch</groupId> | ||
+ | <artifactId>eureka-client</artifactId> | ||
+ | <version>1.0-SNAPSHOT</version> | ||
+ | |||
+ | <properties> | ||
+ | <maven.compiler.source>8</maven.compiler.source> | ||
+ | <maven.compiler.target>8</maven.compiler.target> | ||
+ | </properties> | ||
+ | |||
+ | <dependencyManagement> | ||
+ | <dependencies> | ||
+ | <dependency> | ||
+ | <groupId>org.springframework.cloud</groupId> | ||
+ | <artifactId>spring-cloud-dependencies</artifactId> | ||
+ | <version>Hoxton.SR3</version> | ||
+ | <type>pom</type> | ||
+ | <scope>import</scope> | ||
+ | </dependency> | ||
+ | </dependencies> | ||
+ | </dependencyManagement> | ||
+ | |||
+ | <dependencies> | ||
+ | <dependency> | ||
+ | <groupId>org.springframework.boot</groupId> | ||
+ | <artifactId>spring-boot-starter-web</artifactId> | ||
+ | </dependency> | ||
+ | |||
+ | <dependency> | ||
+ | <groupId>org.springframework.cloud</groupId> | ||
+ | <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> | ||
+ | </dependency> | ||
+ | </dependencies> | ||
+ | </syntaxhighlight> |
2023年3月9日 (四) 03:45的版本
https://www.bilibili.com/video/BV1eU4y187zE/?p=11
Eureka Client 可以向 Eureka Server 中注册自己
导入依赖
注意依赖换成了 Eureka 客户端依赖
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.5.RELEASE</version>
</parent>
<groupId>io.github.jihch</groupId>
<artifactId>eureka-client</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Hoxton.SR3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
</dependencies>