Portal Spring Boot Development
[portal.git] / portal-BE / src / main / java / org / onap / portal / configuration / WebMvcConfiguration.java
diff --git a/portal-BE/src/main/java/org/onap/portal/configuration/WebMvcConfiguration.java b/portal-BE/src/main/java/org/onap/portal/configuration/WebMvcConfiguration.java
new file mode 100644 (file)
index 0000000..416c706
--- /dev/null
@@ -0,0 +1,18 @@
+package org.onap.portal.configuration;
+
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.core.Ordered;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@EnableWebMvc
+@ComponentScan("org.springframework.security.samples.mvc")
+public class WebMvcConfiguration implements WebMvcConfigurer {
+
+       @Override
+       public void addViewControllers(ViewControllerRegistry registry) {
+              registry.addViewController("login.html").setViewName("login.html");
+              registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
+       }
+}