diff options
-rw-r--r-- | juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java | 4 | ||||
-rw-r--r-- | juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java b/juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java index a80740e91..23a353849 100644 --- a/juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java +++ b/juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java @@ -17,10 +17,6 @@ package com.juick.server.configuration; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.SchedulingConfigurer; diff --git a/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java b/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java index 41689bb11..8b37ef177 100644 --- a/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java +++ b/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java @@ -25,12 +25,14 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; +import org.springframework.security.authentication.AuthenticationProvider; import org.springframework.security.authentication.dao.DaoAuthenticationProvider; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.web.AuthenticationEntryPoint; import org.springframework.security.web.authentication.HttpStatusEntryPoint; import org.springframework.security.web.authentication.RememberMeServices; @@ -81,7 +83,7 @@ public class ApiSecurityConfig extends WebSecurityConfigurerAdapter { } @Bean - public DaoAuthenticationProvider authenticationProvider() { + public AuthenticationProvider authenticationProvider() { DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider(); authenticationProvider.setUserDetailsService(userDetailsService()); @@ -90,7 +92,7 @@ public class ApiSecurityConfig extends WebSecurityConfigurerAdapter { } @Bean - public JuickUserDetailsService userDetailsService() { + public UserDetailsService userDetailsService() { return new JuickUserDetailsService(userService); } |