码迷,mamicode.com
首页 > 编程语言 > 详细

SpringCloud的学习记录(2)

时间:2019-03-27 12:44:18      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:ring   epo   height   nap   tps   ott   1.3   pos   artifact   

这一章节主要讲如何搭建eureka-client项目.

在我们生成的Demo项目上右键点击New->Module->spring Initializr, 然后next,?填写GroupArtifact等信息,

这里Artifact填写eureka-client, 再次next,

这里选择的Web下的webCloud Discovery下的Eureka Discovery.

生成的pom.xml文件如下:

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-parent</artifactId>

<version>2.1.3.RELEASE</version>

<relativePath/> <!-- lookup parent from repository -->

</parent>

<groupId>com.xum</groupId>

<artifactId>eureka-client</artifactId>

<version>0.0.1-SNAPSHOT</version>

<name>eureka-client</name>

<description>Demo project for Spring Boot</description>

?

<properties>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<java.version>1.8</java.version>

<spring-cloud.version>Greenwich.RELEASE</spring-cloud.version>

</properties>

<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>

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-test</artifactId>

<scope>test</scope>

</dependency>

</dependencies>

<dependencyManagement>

<dependencies>

<dependency>

<groupId>org.springframework.cloud</groupId>

<artifactId>spring-cloud-dependencies</artifactId>

<version>${spring-cloud.version}</version>

<type>pom</type>

<scope>import</scope>

</dependency>

</dependencies>

</dependencyManagement>

<build>

<plugins>

<plugin>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-maven-plugin</artifactId>

</plugin>

</plugins>

</build>

<repositories>

<repository>

<id>spring-milestones</id>

<name>Spring Milestones</name>

<url>https://repo.spring.io/milestone</url>

</repository>

</repositories>

</project>

?

?

SpringCloud的学习记录(2)

标签:ring   epo   height   nap   tps   ott   1.3   pos   artifact   

原文地址:https://www.cnblogs.com/xumBlog/p/10606576.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!