|
@@ -1,6 +1,7 @@
|
|
|
package com.yaoxiang.diagnosis.config;
|
|
|
|
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
|
@@ -9,8 +10,8 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
@Configuration
|
|
|
public class MvcConfig {
|
|
|
|
|
|
- // @Resource
|
|
|
- private UploadProperties uploadProperties;
|
|
|
+ @Value("${web.loginPage:/login}")
|
|
|
+ private String loginPage;
|
|
|
|
|
|
@Bean
|
|
|
WebMvcConfigurer webMvcConfigurer() {
|
|
@@ -20,7 +21,7 @@ public class MvcConfig {
|
|
|
// registry.addViewController("/").setViewName("index");
|
|
|
// registry.addViewController("/app").setViewName("app");
|
|
|
|
|
|
- registry.addViewController("/login").setViewName("login");
|
|
|
+ registry.addViewController(loginPage).setViewName("login");
|
|
|
// registry.addViewController("/hello").setViewName("hello");
|
|
|
}
|
|
|
|