title: spring boot feign client getting HTTP 404
body: <p>I am currently just checking how to use Feign as Declarative REST client in one of my project.</p>
  
  <p>following is Feign Client</p>
  
  <pre><code>@FeignClient(name = "SEARCHCABMS",configuration = AppFeignConfiguration.class)
         public interface SearchCabMsClient {
  
          @RequestMapping(value = "api/searchcab/locationcabtimedetail/search/getCabForLocationAfterTimeSlot", method = RequestMethod.GET)
          String  searchCabDetails(@PathVariable("fromDate") String fromDate, 
                                  @PathVariable("locationId") long locationId,
                                  @PathVariable("isdeleted") byte isdeleted,
                                  @PathVariable("hourforbooking")int hourforbooking);
      }
  </code></pre>
  
  <p>This interface is autowired in one service</p>
  
  <pre><code>@Autowired
  SearchCabMsClient restService;
  </code></pre>
  
  <p>Added EnableFeignClients to SpringBootApplication </p>
  
  <pre><code>@EnableFeignClients(basePackages = {"com.gp.cabbooking.services.feign"})
  </code></pre>
  
  <p>Dependencies,parent etc  in pom.xml</p>
  
  <pre><code>&lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;1.3.5.RELEASE&lt;/version&gt;
  &lt;/parent&gt;
  </code></pre>
  
  <p>dependency</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
      &lt;artifactId&gt;spring-cloud-starter-eureka&lt;/artifactId&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
      &lt;artifactId&gt;spring-cloud-starter-ribbon&lt;/artifactId&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
      &lt;artifactId&gt;spring-cloud-starter-feign&lt;/artifactId&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>I can able to see while debugging spring create proxy for my feign client 
  i tried calling this service with the help of ribbon and it is working fine 
  but when i execute  method define in my feign client . i am getting <strong>feign.FeignException: status 404 reading</strong> </p>
  
  <pre><code>feign.FeignException: status 404 reading SearchCabMsClient#searchCabDetails(String,long,byte,int)
      at feign.FeignException.errorStatus(FeignException.java:62) ~[feign-core-8.16.2.jar:8.16.2]
      at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:91) ~[feign-core-8.16.2.jar:8.16.2]
      at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:134) ~[feign-core-8.16.2.jar:8.16.2]
      at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76) ~[feign-core-8.16.2.jar:8.16.2]
      at feign.hystrix.HystrixInvocationHandler$1.run(HystrixInvocationHandler.java:97) ~[feign-hystrix-8.16.2.jar:8.16.2]
      at com.netflix.hystrix.HystrixCommand$1.call(HystrixCommand.java:293) ~[hystrix-core-1.5.3.jar:1.5.3]
      at com.netflix.hystrix.HystrixCommand$1.call(HystrixCommand.java:289) ~[hystrix-core-1.5.3.jar:1.5.3]
      at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:46) ~[rxjava-1.1.5.jar:1.1.5]
      at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35) ~[rxjava-1.1.5.jar:1.1.5]
      at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50) ~[rxjava-1.1.5.jar:1.1.5]
      at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.1.5.jar:1.1.5]
      at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50) ~[rxjava-1.1.5.jar:1.1.5]
      at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.1.5.jar:1.1.5]
      at rx.Observable.unsafeSubscribe(Observable.java:8460) ~[rxjava-1.1.5.jar:1.1.5]
      at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51) ~[rxjava-1.1.5.jar:1.1.5]
      at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35) ~[rxjava-1.1.5.jar:1.1.5]
      at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50) ~[rxjava-1.1.5.jar:1.1.5]
  </code></pre>