exception error

This commit is contained in:
shimingxy
2020-01-06 22:06:05 +08:00
parent 8110d99451
commit b7a0ecddc0
25 changed files with 117 additions and 101 deletions

View File

@@ -10,6 +10,7 @@
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>

View File

@@ -0,0 +1,39 @@
package org.maxkey.web;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
/**
* Index
* @author Crystal.Sea
*
*/
@Controller
public class ExceptionEndpoint {
private static Logger _logger = LoggerFactory.getLogger(ExceptionEndpoint.class);
@RequestMapping(value={"/exception/error/400"})
public ModelAndView error400() {
_logger.debug("exception/400.");
return new ModelAndView("exception/400");
}
@RequestMapping(value={"/exception/error/404"})
public ModelAndView error404() {
_logger.debug("exception/404.");
return new ModelAndView("exception/404");
}
@RequestMapping(value={"/exception/error/500"})
public ModelAndView error500() {
_logger.debug("exception/500.");
return new ModelAndView("exception/500");
}
@RequestMapping(value={"/exception/accessdeny"})
public ModelAndView accessdeny() {
_logger.debug("exception/accessdeny.");
return new ModelAndView("exception/accessdeny");
}
}