forked from in28minutes/spring-microservices
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Ranga Rao Karanam
authored and
Ranga Rao Karanam
committed
Sep 9, 2017
1 parent
928200e
commit 9d9124f
Showing
7 changed files
with
1,164 additions
and
14 deletions.
There are no files selected for viewing
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
15 changes: 15 additions & 0 deletions
15
...com/in28minutes/microservices/currencyconversionservice/CurrencyExchangeServiceProxy.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,15 @@ | ||
package com.in28minutes.microservices.currencyconversionservice; | ||
|
||
import org.springframework.cloud.netflix.feign.FeignClient; | ||
import org.springframework.cloud.netflix.ribbon.RibbonClient; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
|
||
//@FeignClient(name="currency-exchange-service", url="localhost:8000") | ||
@FeignClient(name="currency-exchange-service") | ||
@RibbonClient(name="currency-exchange-service") | ||
public interface CurrencyExchangeServiceProxy { | ||
@GetMapping("/currency-exchange/from/{from}/to/{to}") | ||
public CurrencyConversionBean retrieveExchangeValue | ||
(@PathVariable("from") String from, @PathVariable("to") String to); | ||
} |
3 changes: 2 additions & 1 deletion
3
03.microservices/currency-conversion-service/src/main/resources/application.properties
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
spring.application.name=currency-conversion-service | ||
server.port=8100 | ||
server.port=8100 | ||
currency-exchange-service.ribbon.listOfServers=http://localhost:8000,http://localhost:8001 |
Oops, something went wrong.