forked from gongxings/spring-cloud-study
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
821 additions
and
111 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
springcloud-study-euraka-7001/src/main/java/com/gxs/springcloud/EurekaServer7001App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.gxs.springcloud; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; | ||
|
||
/** | ||
* @author GongXings | ||
* @createTime 30 18:04 | ||
* @description | ||
*/ | ||
@SpringBootApplication | ||
/** | ||
* 启用eureka服务,接收其他服务注册 | ||
*/ | ||
@EnableEurekaServer | ||
public class EurekaServer7001App { | ||
public static void main(String[] args) { | ||
SpringApplication.run(EurekaServer7001App.class,args); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
springcloud-study-euraka-7001/target/classes/application.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
server: | ||
port: 7001 | ||
eureka: | ||
instance: | ||
hostname: localhost #eureka服务端的实例名称 | ||
client: | ||
register-with-eureka: false #false表示不向注册中心注册自己 | ||
fetch-registry: false #false 表示自己就是注册中心,职责就是维护服务实例,并不需要去检索服务 | ||
service-url: | ||
# 单机版配置defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka #设置与eureka server 交互的地址查询服务和注册服务都需要依赖的地址 | ||
#集群配置 | ||
defaultZone: http://eureka7002.com:7002/eureka/,http://eureka7003.com:7003/eureka |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?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>com.gxs.springcloud</groupId> | ||
<artifactId>spring-cloud-study</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>springcloud-study-euraka-7002</artifactId> | ||
|
||
<dependencies> | ||
<!--eureka-server 服务端--> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-starter-eureka-server</artifactId> | ||
</dependency> | ||
<!--热部署 修改后立即生效--> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>springloaded</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-devtools</artifactId> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
</project> |
21 changes: 21 additions & 0 deletions
21
springcloud-study-euraka-7002/src/main/java/com/gxs/springcloud/EurekaServer7002App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.gxs.springcloud; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; | ||
|
||
/** | ||
* @author GongXings | ||
* @createTime 30 18:04 | ||
* @description | ||
*/ | ||
@SpringBootApplication | ||
/** | ||
* 启用eureka服务,接收其他服务注册 | ||
*/ | ||
@EnableEurekaServer | ||
public class EurekaServer7002App { | ||
public static void main(String[] args) { | ||
SpringApplication.run(EurekaServer7002App.class,args); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
springcloud-study-euraka-7002/src/main/resources/application.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
server: | ||
port: 7002 | ||
eureka: | ||
instance: | ||
hostname: localhost #eureka服务端的实例名称 | ||
client: | ||
register-with-eureka: false #false表示不向注册中心注册自己 | ||
fetch-registry: false #false 表示自己就是注册中心,职责就是维护服务实例,并不需要去检索服务 | ||
service-url: | ||
# 单机版配置defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka #设置与eureka server 交互的地址查询服务和注册服务都需要依赖的地址 | ||
#集群配置 | ||
defaultZone: http://eureka7001.com:7001/eureka/,http://eureka7003.com:7003/eureka/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?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>com.gxs.springcloud</groupId> | ||
<artifactId>spring-cloud-study</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>springcloud-study-euraka-7003</artifactId> | ||
|
||
<dependencies> | ||
<!--eureka-server 服务端--> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-starter-eureka-server</artifactId> | ||
</dependency> | ||
<!--热部署 修改后立即生效--> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>springloaded</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-devtools</artifactId> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
</project> |
21 changes: 21 additions & 0 deletions
21
springcloud-study-euraka-7003/src/main/java/com/gxs/springcloud/EurekaServer7003App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.gxs.springcloud; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; | ||
|
||
/** | ||
* @author GongXings | ||
* @createTime 30 18:04 | ||
* @description | ||
*/ | ||
@SpringBootApplication | ||
/** | ||
* 启用eureka服务,接收其他服务注册 | ||
*/ | ||
@EnableEurekaServer | ||
public class EurekaServer7003App { | ||
public static void main(String[] args) { | ||
SpringApplication.run(EurekaServer7003App.class,args); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
springcloud-study-euraka-7003/src/main/resources/application.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
server: | ||
port: 7003 | ||
eureka: | ||
instance: | ||
hostname: localhost #eureka服务端的实例名称 | ||
client: | ||
register-with-eureka: false #false表示不向注册中心注册自己 | ||
fetch-registry: false #false 表示自己就是注册中心,职责就是维护服务实例,并不需要去检索服务 | ||
service-url: | ||
# 单机版配置defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka #设置与eureka server 交互的地址查询服务和注册服务都需要依赖的地址 | ||
#集群配置 | ||
defaultZone: http://eureka7001.com:7001/eureka/,http://eureka7002.com:7002/eureka/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.