title: Spring boot - Whitelabel Error Page with HTML
body: <p>I am new to Spring Boot. I am trying to write Addition of two numbers using HTML and Spring Boot and I am getting below error. I am not getting where it's getting wrong. Thank you for your help in advance.</p>
  <pre><code>Whitelabel Error Page
  This application has no explicit mapping for /error, so you are seeing this as a fallback.
  
  Wed Sep 29 14:16:06 IST 2021
  There was an unexpected error (type=Not Found, status=404).Whitelabel Error Page
  This application has no explicit mapping for /error, so you are seeing this as a fallback.
  
  Wed Sep 29 14:16:06 IST 2021
  There was an unexpected error (type=Not Found, status=404).
  </code></pre>
  <p>Tried so many solutions but still not able to identify what is wrong.</p>
  <p>Below is the code:</p>
  <p>/templates/view.html</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset=&quot;ISO-8859-1&quot;&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;form action=&quot;add&quot;&gt;
      &lt;input type=&quot;text&quot; name=&quot;t1&quot;&gt;&lt;br&gt;
      &lt;input type=&quot;text&quot; name=&quot;t2&quot;&gt;&lt;br&gt;
      &lt;input type=&quot;submit&quot;&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  
  </code></pre>
  <p>AddController.java</p>
  <pre><code>package com.springboot.swagger.controller;
  
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestParam;
  import org.springframework.web.bind.annotation.ResponseBody;
  import org.springframework.web.bind.annotation.RestController;
  
  @RestController
  public class AddController {
  
      @RequestMapping(&quot;/add&quot;)
      @ResponseBody
      public String courses(@RequestParam(&quot;t1&quot;) int i, @RequestParam(&quot;t2&quot;) int j) {
          
          return (i+j)+&quot;&quot;;
      }
      
  }
  
  </code></pre>
  <p>SpringBootApplication.java</p>
  <pre><code>package com.springboot.swagger;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.context.annotation.ComponentScan;
  
  @SpringBootApplication
  @ComponentScan(basePackages={&quot;com.springboot&quot;})
  public class DemoAppApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(DemoAppApplication.class, args);
      }
  
  }
  </code></pre>
  <p>application.properties</p>
  <pre><code>server.port=2080
  logging.level.web=debug
  logging.level.root=debug
  </code></pre>