package com.style24.core.support.controller;

import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.stereotype.Controller;

/**
 * Custom Error Controller
 * 1. Disabling the Whitelabel Error Page
 * - application.yml 파일에 다음을 추가
 * server.error.whitelabel.enabled=false
 * or
 * - ~Application.java 파일에 다음을 추가
 * 
 * @EnableAutoConfiguration(exclude = {ErrorMvcAutoConfiguration.class})
 * 2. Create a Custom ErrorController
 * you have to create a class that implements the ErrorController interface.
 * And overrides its getErrorPath() to return a custom path to call when an error occurred.
 * 
 * @author gagamel
 * @since 2020. 10. 5
 */
@Controller
public class TscCustomErrorController implements ErrorController {

	@Override
	public String getErrorPath() {
		return "/error";
	}

}
