This application has no explicit mapping for /error

The Solution to This application has no explicit mapping for /error is


Make sure that your main class is in a root package above other classes.

When you run a Spring Boot Application, (i.e. a class annotated with @SpringBootApplication), Spring will only scan the classes below your main class package.

com
   +- APP
         +- Application.java  <--- your main class should be here, above your controller classes
         |
         +- model
         |   +- user.java
         +- controller
             +- UserController.java

~ Answered on 2016-08-18 12:07:58


Most Viewed Questions: