Commit e7956e19 by Spencer Gibb

updated feign docs to use new @FeignClient*

fixes gh-111
parent 9ba39c99
...@@ -416,12 +416,8 @@ Example spring boot app ...@@ -416,12 +416,8 @@ Example spring boot app
@ComponentScan @ComponentScan
@EnableAutoConfiguration @EnableAutoConfiguration
@EnableEurekaClient @EnableEurekaClient
public class Application extends FeignConfiguration { @FeignClientScan
@Bean public class Application {
public StoreClient storeClient() {
//loadBalance plugs Feign into ribbon. feign() works without load balancing.
return loadBalance(StoreClient.class, "http://stores");
}
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(Application.class, args); SpringApplication.run(Application.class, args);
...@@ -433,6 +429,7 @@ public class Application extends FeignConfiguration { ...@@ -433,6 +429,7 @@ public class Application extends FeignConfiguration {
.StoreClient.java .StoreClient.java
[source,java,indent=0] [source,java,indent=0]
---- ----
@FeignClient("stores")
public interface StoreClient { public interface StoreClient {
@RequestMapping(method = RequestMethod.GET, value = "/stores") @RequestMapping(method = RequestMethod.GET, value = "/stores")
List<Store> getStores(); List<Store> getStores();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment