Skip to content

Commit

Permalink
Merge pull request #53 from belljun3395/web-config-test
Browse files Browse the repository at this point in the history
fix: WebSecurityConfig 빈 등록 방법 수정
  • Loading branch information
belljun3395 authored Aug 27, 2024
2 parents f899953 + 24a353d commit d0f76b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.few.api.security.filter.token.TokenAuthenticationFilter
import com.few.api.security.handler.DelegatedAccessDeniedHandler
import com.few.api.security.handler.DelegatedAuthenticationEntryPoint
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Profile
import org.springframework.http.HttpMethod
import org.springframework.security.authentication.ProviderManager
Expand All @@ -17,14 +18,13 @@ import org.springframework.security.config.http.SessionCreationPolicy
import org.springframework.security.web.SecurityFilterChain
import org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter
import org.springframework.security.web.util.matcher.AntPathRequestMatcher
import org.springframework.stereotype.Component
import org.springframework.web.cors.CorsConfiguration
import org.springframework.web.cors.CorsConfigurationSource
import org.springframework.web.cors.UrlBasedCorsConfigurationSource
import org.springframework.web.filter.OncePerRequestFilter

@Configuration
@EnableWebSecurity
@Component
class WebSecurityConfig(
private val authenticationEntryPoint: DelegatedAuthenticationEntryPoint,
private val accessDeniedHandler: DelegatedAccessDeniedHandler,
Expand Down
2 changes: 0 additions & 2 deletions api/src/main/kotlin/com/few/api/web/config/WebConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ import org.springframework.context.annotation.Configuration
import org.springframework.format.FormatterRegistry
import org.springframework.web.cors.CorsConfiguration
import org.springframework.web.servlet.config.annotation.CorsRegistry
import org.springframework.web.servlet.config.annotation.EnableWebMvc
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer

@EnableWebMvc
@Configuration
class WebConfig : WebMvcConfigurer {
override fun addCorsMappings(registry: CorsRegistry) {
Expand Down

0 comments on commit d0f76b8

Please sign in to comment.