Skip to content

Commit be314bd

Browse files
Merge pull request #3 from BarathArivazhagan/dev
fixed hystrix issue
2 parents 18b2996 + 95ed83e commit be314bd

File tree

9 files changed

+22
-21
lines changed

9 files changed

+22
-21
lines changed

config-server/src/main/java/com/barath/app/EurekaConfigServerApplication.java renamed to config-server/src/main/java/com/barath/app/ConfigServerApplication.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
@SpringBootApplication
88
@EnableConfigServer
9-
public class EurekaConfigServerApplication {
9+
public class ConfigServerApplication {
1010

1111
public static void main(String[] args) {
12-
SpringApplication.run(EurekaConfigServerApplication.class, args);
12+
SpringApplication.run(ConfigServerApplication.class, args);
1313
}
1414
}

config-server/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ server:
44

55
spring:
66
application:
7-
name: eureka-config-server
7+
name: config-server
88
profiles:
99
active: native
1010
cloud:

config-server/src/test/java/com/barath/app/EurekaConfigServerApplicationTests.java renamed to config-server/src/test/java/com/barath/app/ConfigServerApplicationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
@RunWith(SpringRunner.class)
99
@SpringBootTest
10-
public class EurekaConfigServerApplicationTests {
10+
public class ConfigServerApplicationTests {
1111

1212
@Test
1313
public void contextLoads() {

eureka-client-app1/src/main/java/com/barath/app/Application.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public String welcome(){
3434
return "HELLO FROM EUREKA CLIENT 1";
3535
}
3636

37-
@GetMapping("/callClient2")
37+
@GetMapping("/invoke/client2")
3838
public String invokeClient2App(){
3939
logger.info("invoke eureka client app2");
4040
return client2.welcome();

eureka-client-app1/src/main/java/com/barath/app/Client2.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,3 @@ public interface Client2 {
1010
@GetMapping("/")
1111
public String welcome();
1212
}
13-
class Client2Fallback implements Client2 {
14-
15-
@Override
16-
public String welcome() {
17-
18-
return "Something went wrong, wait for sometime";
19-
}
20-
21-
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.barath.app;
2+
3+
import org.springframework.stereotype.Component;
4+
5+
@Component
6+
public class Client2Fallback implements Client2 {
7+
8+
@Override
9+
public String welcome() {
10+
11+
return "Something went wrong, wait for sometime";
12+
}
13+
14+
}

eureka-client-app2/src/main/java/com/barath/app/Application.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,5 @@ public String welcome(){
2929
return "<b>HELLO FROM EUREKA CLIENT 2</b>";
3030
}
3131

32-
@GetMapping("/callClient1")
33-
public String invokeClient1App(){
34-
35-
logger.info("invoke eureka client app1");
36-
return "HELLO FROM EUREKA CLIENT 1";
37-
}
32+
3833
}

eureka-server/src/main/resources/application.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ spring:
99
eureka:
1010
instance:
1111
hostname: localhost
12+
1213
client:
1314
fetch-registry: false
1415
register-with-eureka: false

zuul-proxy/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ zuul:
1818
CLIENT1:
1919
service-id: eureka-client-app1
2020
path: /app1/*
21-
strip-prefix: true
21+
strip-prefix: false
2222
CLIENT2:
2323
service-id: eureka-client-app2
2424
path: /app2/*

0 commit comments

Comments
 (0)