首先创建一个类并且继承 WebMvcConfigurer 这个接口 并且实现 addViewControllers 实现这个方法这是时候需要传一个参数 ViewControllerRegistry registry 废话少说上图!!!!