@Component
public class WebConfig implements ErrorPageRegistrar{
@Override
public void registerErrorPages(ErrorPageRegistry registry) {
ErrorPage error404Page = new ErrorPage(HttpStatus.NOT_FOUND,"/");
registry.addErrorPages(error404Page);
}
}
springboot angular前后端分离部署时,正常路径刷新后报404的解决办法
最新推荐文章于 2024-07-18 12:14:53 发布