|
@@ -0,0 +1,19 @@
|
|
|
|
+package com.hssx.website.defaultviewconfig;
|
|
|
|
+
|
|
|
|
+import org.springframework.context.annotation.Configuration;
|
|
|
|
+import org.springframework.core.Ordered;
|
|
|
|
+import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
|
|
|
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * 用于配置自定义的首页;
|
|
|
|
+ */
|
|
|
|
+@Configuration
|
|
|
|
+public class DefaultView extends WebMvcConfigurerAdapter {
|
|
|
|
+ @Override
|
|
|
|
+ public void addViewControllers(ViewControllerRegistry registry) {
|
|
|
|
+ registry.addViewController("/").setViewName("login");
|
|
|
|
+ registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
|
|
|
|
+ super.addViewControllers(registry);
|
|
|
|
+ }
|
|
|
|
+}
|