柚子快报激活码778899分享:搭建eureka单机环境

http://yzkb.51969.com/

 

 

 

 

 

 

 

 

 

 

 

 

org.springframework.cloud

spring-cloud-starter-netflix-eureka-server

 

 

 

package com.eureka;

import org.springframework.boot.SpringApplication;

import org.springframework.boot.autoconfigure.SpringBootApplication;

import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

/**

* @author yourheart

* @Description

* @create 2021-06-16 23:04

*/

@SpringBootApplication

@EnableEurekaServer

public class EurekaOneApplication {

public static void main(String[] args) {

SpringApplication.run(EurekaOneApplication.class,args);

}

}

 

 

 

server.port=8762

spring.application.name=springcloud-eureka

eureka.instance.hostname=localhost

eureka.client.service-url.defaultZone=http://${eureka.instance.hostname}:8762

eureka.client.register-with-eureka=false

eureka.client.fetch-registry=false

以上就是子工程创建的全部,该子工程需要依赖父工程,父工程如下

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

4.0.0

com.lagou

springcloud-lagou

pom

1.0-SNAPSHOT

springcloud-eureka

org.springframework.boot

spring-boot-starter-parent

2.1.6.RELEASE

org.springframework.cloud

spring-cloud-dependencies

Greenwich.RELEASE

pom

import

org.springframework.cloud

spring-cloud-starter-netflix-eureka-server

2.1.6.RELEASE

org.apache.maven.plugins

maven-compiler-plugin

1.8

1.8

utf-8

org.springframework.boot

spring-boot-maven-plugin

 

 

 

 

 

 

柚子快报激活码778899分享:搭建eureka单机环境

http://yzkb.51969.com/

推荐文章

评论可见,请评论后查看内容,谢谢!!!评论后请刷新页面。