build: 后台主页,错误页面跳转

This commit is contained in:
CaptainB 2023-05-26 13:10:52 +08:00
parent 3e9f73c596
commit e95e6284de
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,14 @@
package io.metersphere.controller;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class CustomErrorController implements ErrorController {
@GetMapping("/error")
public String redirectRoot() {
return "redirect:/";
}
}

View File

@ -0,0 +1,12 @@
package io.metersphere.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class IndexController {
@GetMapping("/")
public String index() {
return "index.html";
}
}