mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-05-08 08:07:46 +08:00
404处理
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
package com.hxkj.admin.config;
|
||||
|
||||
import org.springframework.boot.web.server.ErrorPage;
|
||||
import org.springframework.boot.web.server.ErrorPageRegistrar;
|
||||
import org.springframework.boot.web.server.ErrorPageRegistry;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class ErrorPageConfig implements ErrorPageRegistrar {
|
||||
|
||||
@Override
|
||||
public void registerErrorPages(ErrorPageRegistry registry) {
|
||||
ErrorPage error404Page=new ErrorPage(HttpStatus.NOT_FOUND,"/index.html" );
|
||||
registry.addErrorPages(error404Page);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user