title: Spring boot always send error on localhost:8080
body: <p>I have UserRepository</p>
  <pre><code>    package registry;
      import Entity.User;
      import org.springframework.data.jpa.repository.JpaRepository;
      import org.springframework.data.repository.CrudRepository;
      import org.springframework.stereotype.Component;
      import org.springframework.stereotype.Repository;
  
      @Repository
      public interface UserRepository extends JpaRepository&lt;User, Long&gt; {}
  </code></pre>
  <p>UserController</p>
  <pre><code>package controller;
  
  import Entity.User;
  import exception.NoUserFoundException;
  import exception.UserNotFoundException;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.http.HttpStatus;
  import org.springframework.http.ResponseEntity;
  import org.springframework.web.bind.annotation.*;
  import registry.UserRepository;
  import service.UserService;
  
  import javax.xml.ws.Response;
  import java.util.List;
  
  @RestController
  @CrossOrigin(origins = &quot;http://localhost:4200&quot;)
  @SpringBootApplication(scanBasePackages = {&quot;controller&quot;, &quot;service&quot;,&quot;registry&quot;})
  public class UserController {
  
      @Autowired
      private UserService userService;
  
      @GetMapping(&quot;/user/getall&quot;)
      public ResponseEntity&lt;?&gt; getAllUsers() {
          return new ResponseEntity&lt;&gt;(userService.getAllUsers(), HttpStatus.OK);
      }
  }
  
  </code></pre>
  <p>ApplicationRunner</p>
  <pre><code>package Application;
  
  import Entity.User;
  import org.springframework.boot.CommandLineRunner;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
  import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.ComponentScan;
  import registry.UserRepository;
  import service.UserService;
  import service.UserServiceImpl;
  import controller.UserController;
  
  @SpringBootApplication
  public class ApplicationRunner  {
      public static void main(String... args) {
          SpringApplication.run(ApplicationRunner.class, args);
      }
  
  }
  
  </code></pre>
  <p>The application runs fine.
  When I type the url &quot;localhost://8080&quot; or &quot;localhost://8080/user/getall&quot; I have the following error message :</p>
  <p>Whitelabel Error Page</p>
  <p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p>
  <p>Wed Jun 30 01:30:30 CEST 2021</p>
  <p>There was an unexpected error (type=Not Found, status=404).</p>
  <p>Anyhelp appreciated</p>