title: Failed to handle request [GET http://localhost:8080 ]: Response status 404 Spring, RESTfull ,thymleaf
body: <p>I m experiencing a problem with Spring, Rest and Thymeleafand I'm stuck there and there is not so much details about this error that I'm experiencing.</p>
  
  <p>I want when I select in the form one of the options in the select tag (index.html)  to be redirected to the something.html but with the new values(with an api call ) and I'm just getting that it can't handle the request.</p>
  
  <p>I want so send the value to service and controller from a html form:</p>
  
  <p>The index.html:</p>
  
  <pre><code>&lt;body&gt;
  &lt;!--/*@thymesVar id="cryptos" type="java.util.Map&lt;Integer, jasmin.merusic.domain.Crypto&gt;"*/--&gt;
  &lt;!--/*@thymesVar id="crypto" type="jasmin.merusic.domain.Crypto"*/--&gt;
  &lt;div class="container-fluid" style="margin-top: 20px"&gt;
  &lt;div class="row"&gt;
      &lt;div class="col-md-6 col-md-offset-3"&gt;
          &lt;div class="panel panel-primary"&gt;
  
              &lt;div class="panel-heading"&gt;
                  &lt;h1 class="panel-title"&gt;CryptoCurrencies from API&lt;/h1&gt;
              &lt;/div&gt;
              &lt;div class="panel-body"&gt;
                  &lt;div class="table-responsive" th:if="${not #maps.isEmpty(cryptos)}"&gt;
                      &lt;table class="table table-hover "&gt;
                          &lt;thead class="thead-inverse"&gt;
                          &lt;tr&gt;
                              &lt;th&gt;Name&lt;/th&gt;
                              &lt;th&gt;
                                 **&lt;form th:action="@{/values/}" &gt;
                                  &lt;select name="fiatCurrency" onchange="this.form.submit()"&gt;
                                  &lt;option  selected="selected" value="USD"&gt;USD&lt;/option&gt;
                                  &lt;option  value="EUR"&gt;Euro&lt;/option&gt;
                                  &lt;option  value="CNY"&gt;C. Yuan&lt;/option&gt;
                                  &lt;/select&gt;
                                 &lt;/form&gt;**
                              &lt;/th&gt;
                              &lt;th&gt;Change in 24h(%)&lt;/th&gt;
                              &lt;th&gt;Rank&lt;/th&gt;
                              &lt;th&gt;Symbol&lt;/th&gt;
                          &lt;/tr&gt;
                          &lt;/thead&gt;
                          &lt;tr th:remove="all"&gt;
                              &lt;td&gt;Joe&lt;/td&gt;
                              &lt;td&gt;Buck&lt;/td&gt;
                              &lt;td&gt;Male&lt;/td&gt;
                              &lt;td&gt;foo@example.com&lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr th:remove="all"&gt;
                              &lt;td&gt;Joe&lt;/td&gt;
                              &lt;td&gt;Buck&lt;/td&gt;
                              &lt;td&gt;Male&lt;/td&gt;
                              &lt;td&gt;foo@example.com&lt;/td&gt;
                          &lt;/tr&gt;
  
                          &lt;tr th:each="crypto : ${cryptos.values()}"&gt;
                              &lt;td th:text="${crypto.name}"&gt;Joe&lt;/td&gt;
                                  &lt;span th:each="cryp : ${crypto.quotes.values()}"&gt;
                                      &lt;td th:text="${cryp.price}"&gt;Buck&lt;/td&gt;
                                      &lt;td th:text="${cryp.percent_change_24h}"&gt;Buck&lt;/td&gt;
                                  &lt;/span&gt;
                              &lt;td th:text="${crypto.rank}"&gt;Male&lt;/td&gt;
                              &lt;td th:text="${crypto.symbol}"&gt;foo@example.com&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>The controller class is like that: </p>
  
  <pre><code>@Controller
  public class DataController {
  
   private  ApiService apiService;
  
  public DataController(ApiService apiService) {
      this.apiService = apiService;
  }
  
  @GetMapping({"", "/", "/index","/cryptos"})
  public String index(Model model){
  
      model.addAttribute("cryptos",apiService.getCrypto(100));
  
      return "index";
  }
  
  @PostMapping(value = "/values/{fiatCurrency}")
  public String choseCurrency(Model model,@PathVariable String fiatCurrency){
  
      model.addAttribute("cryp",apiService.getInDifferentValues(fiatCurrency));
  
       //returns to the something.html
      return "something";
  }
  }
  </code></pre>
  
  <p>And the service implementation looks like this:</p>
  
  <pre><code>@Service
  public class ApiServiceImpl implements ApiService{
  
  private  RestTemplate restTemplate;
  
  @Autowired
  public ApiServiceImpl(RestTemplate restTemplate) {
      this.restTemplate = restTemplate;
  }
  
  @Override
  public Map&lt;Integer,Crypto&gt; getCrypto(Integer limit) {
  
      CryptoData cryptoData = restTemplate.getForObject("https://api.coinmarketcap.com/v2/ticker/?convert=BTC&amp;limit=" + limit , CryptoData.class);
  
  
      return cryptoData.getData();
  }
  
  @Override
  public Map&lt;Integer, Crypto&gt; getInDifferentValues(String fiatCurrency) {
  
      CryptoData cryptoData = restTemplate.
              getForObject("https://api.coinmarketcap.com/v2/ticker/?convert=" + fiatCurrency + "&amp;limit=100", CryptoData.class);
  
      return cryptoData.getData();
  }
  }
  </code></pre>
  
  <p>I'm a newbie in this and i came across the following error:</p>
  
  <pre><code>2018-10-19 20:10:40.147  WARN 15768 --- [ctor-http-nio-4] .a.w.r.e.DefaultErrorWebExceptionHandler : Failed to handle request [GET http://localhost:8080/values/?fiatCurrency=EUR]: Response status 404
  </code></pre>