package top.imwork.window.silos.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 〈功能简述〉
 * 〈mvc配置类〉
 * 使用WebMvcConfigurerAdapter可以来扩展SpringMVC的功能
 * @EnableWebMvc 不要接管SpringMVC
 * FileName: WebMvcConfig
 *
 * @author e-jiangxiaowei
 * @create 2020/7/11 10:27
 * @since 1.0.0.0
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    /**
     *
     * 登录页视图控制
     * */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/login.html").setViewName("/login/login");
        registry.addViewController("/").setViewName("/login/login");
        registry.addViewController("/login").setViewName("/login/login");
    }
}