projects
/
examples
/
facebook-app
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switched from the manual implemented authentication-layer to Spring Security
[examples/facebook-app]
/
src
/
main
/
java
/
de
/
juplo
/
yourshouter
/
WebMvcConfig.java
diff --git
a/src/main/java/de/juplo/yourshouter/WebMvcConfig.java
b/src/main/java/de/juplo/yourshouter/WebMvcConfig.java
index
e5c6d6f
..
d520d24
100644
(file)
--- a/
src/main/java/de/juplo/yourshouter/WebMvcConfig.java
+++ b/
src/main/java/de/juplo/yourshouter/WebMvcConfig.java
@@
-2,12
+2,10
@@
package de.juplo.yourshouter;
-import javax.inject.Inject;
import org.springframework.context.annotation.Configuration;
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.EnableWebMvc;
-import org.springframework.web.servlet.config.annotation.
Intercepto
rRegistry;
+import org.springframework.web.servlet.config.annotation.
ViewControlle
rRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@@
-20,21
+18,13
@@
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
@EnableWebMvc
public class WebMvcConfig extends WebMvcConfigurerAdapter
{
@EnableWebMvc
public class WebMvcConfig extends WebMvcConfigurerAdapter
{
- @Inject
- private UsersConnectionRepository usersConnectionRepository;
-
-
/**
/**
- * Configure the {@link UserCookieInterceptor} to intercept all requests.
- *
- * @param registry
- * The {@link InterceptorRegistry} to use.
- *
- * @see {@link UserCookieInterceptor}
+ * {@inheritDoc}
*/
@Override
*/
@Override
- public void add
Interceptors(Intercepto
rRegistry registry)
+ public void add
ViewControllers(ViewControlle
rRegistry registry)
{
{
- registry.addInterceptor(new UserCookieInterceptor(usersConnectionRepository));
+ // Configure the view /thymeleaf/signin.html for the path /signin.html
+ registry.addViewController("/signin.html");
}
}
}
}