2
Answers

What is white label error in springboot?

Photo of Niveedha M

Niveedha M

2y
677
1
Whitelabel erro

Answers (2)

1
Photo of Mohamed Azarudeen Z
133 13.9k 197.2k 2y

Whitelabel error page appears when you hit a url which result into HTTP error. Whitelabel error page is generated by Spring Boot as a default mechanism when no custom error page is found.

Provide your code so that it will be easy to see what error it is and how to rectify it.

Accepted
1
Photo of Janarthanan S
149 12.7k 128.8k 2y

As a beginner to SpringBoot, this error can be happened to anyone at least once, due to some reasons.

  1. The Application class (eg: SpringAppApplication.java) should be at the root level, and the controller classes can be placed under the same level or maybe in a subdirectory. This application class should be denoted using @SpringBootApplication or extends from SpringBootApplication
  2. You may miss the @RestController annotation on top of the controller class.
  3. Can be missed the mapping annotation.( @PostMapping("/save") or @GetMapping("/id") etc.)
  4. finally check whether you are entering the correct request mapping address(URL), because you may miss a slash or annotation. else double-check the spelling. eg:@RequestMapping("/customer")