This commit is contained in:
2022-03-04 15:48:13 +09:00
parent 3e80f1b332
commit f381bfe5b1
14 changed files with 872 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
}

View File

@@ -2,7 +2,9 @@ package bit.space;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@EnableDiscoveryClient
@SpringBootApplication
public class MemberApplication {

View File

@@ -1,9 +1,11 @@
package bit.space.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(path = "/member-service")
public class MemberController {
@GetMapping("/api/welcome")

View File

@@ -1,2 +1,13 @@
server:
port: 9999
port: 10001
spring:
application:
name: member-service
eureka:
client:
register-with-eureka: true
fetch-registry: true
service-url:
defalutZone: http://localhost:8761/eureka