title: Spring Boot API deployed successfully but on hitting the endpoint it is returning 404
body: <p>I have deployed a SpringBoot API on Cloudfoundry PAAS, although hitting the same API on localhost returns desired result. As per my understanding, the API endpoint exists but Spring Boot controller is not accessible.</p>
  
  <p><a href="https://i.stack.imgur.com/bRafK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bRafK.png" alt="enter image description here"></a></p>
  
  <pre><code>&lt;!doctype html&gt;&lt;html lang="en"&gt;&lt;head&gt;&lt;title&gt;HTTP Status 404 – Not Found&lt;/title&gt;&lt;style type="text/css"&gt;body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}&lt;/style&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;HTTP Status 404 – Not Found&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>Build and deployments were successful ( Tried both via jenkins and using cf command line tool)</p>
  
  <pre><code>**Controller Code**
  @RestController
  @Validated
  @RequestMapping("/someContext/v1")
  public class PController {
  
  
  
      @GetMapping(value = "/pro")
      @RequestLogger
      @ApiOperation(value = "Get  Details", notes = "This operation is for retrieving  details.",produces=MediaType.APPLICATION_JSON) 
      public @ResponseBody ResponseP getDetails(
      .
      .
      .
  </code></pre>
  
  <p>Route : <a href="https://dc-cprobsdev.np3a.paas.bip.uk.xxx-intl.com/" rel="nofollow noreferrer">https://dc-cprobsdev.np3a.paas.bip.uk.xxx-intl.com/</a></p>
  
  <p>Hitting the route with/without context root returns the same 404 result.</p>