赞
踩
- <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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>com.app</groupId>
- <artifactId>study-spring-cloud</artifactId>
- <version>1.0.0</version>
- </parent>
-
- <artifactId>eureka-server</artifactId>
-
- <dependencies>
- <!-- eureka-server依赖 -->
- <dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>app</finalName>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
- </project>
- package com.app.eureka;
-
- import org.springframework.boot.SpringApplication;
- import org.springframework.boot.autoconfigure.SpringBootApplication;
- import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
-
- /**
- * 添加Eureka的服务启动类
- *
- * @author Administrator
- */
- @SpringBootApplication
- @EnableEurekaServer
- public class EurekaApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(EurekaApplication.class, args);
- }
-
- }
- server:
- port: 9000
- spring:
- application:
- name: eureka-server
- eureka:
- client:
- service-url:
- # 服务端暴露的地址
- defaultZone: http://127.0.0.1:9000/eureka
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。