Sign in users via Facebook and sign up new users automatically
[examples/facebook-app] / src / main / java / de / juplo / yourshouter / WebMvcConfig.java
index e5c6d6f..6676ae6 100644 (file)
@@ -8,6 +8,7 @@ import org.springframework.context.annotation.Configuration;
 import org.springframework.social.connect.UsersConnectionRepository;
 import org.springframework.web.servlet.config.annotation.EnableWebMvc;
 import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
 
@@ -37,4 +38,14 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter
   {
     registry.addInterceptor(new UserCookieInterceptor(usersConnectionRepository));
   }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void addViewControllers(ViewControllerRegistry registry)
+  {
+    // Configure the view /thymeleaf/signin.html for the path /signin.html
+    registry.addViewController("/signin.html");
+  }
 }