Я получаю «страницу ошибки Whitelabel» при запуске Spring Boot Application, даже после сопоставления URL-адресов.
Я упомянул мой файл application.properties и один файл контроллера
application.properties file
server.port=8087
server.servlet.context-path=/starts
spring.h2.console.enabled=true
---------------------------------------------
TestController.java file
package com.example.firstproject.Controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.example.firstproject.Entity.Employee;
import com.example.firstproject.Service.EmployeeService;
@RestController
public class TestController {
@Autowired
EmployeeService empService;
@RequestMapping("/save")
public int test(@RequestBody Employee emp) {
return empService.saveEmployee(emp);
//return 0;
}
@RequestMapping("/getAll")
public List<Employee> home() {
return empService.getAll();
}
@RequestMapping("/test")
public String test()
{
return "success";
}
}
Я также приложил изображение ошибки, полученное при запуске проекта Страница ошибки Whitelabel
Как мне удалить эту ошибку?