Class SecurityConfig

  • All Implemented Interfaces:
    org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,​org.springframework.security.config.annotation.web.builders.WebSecurity>, org.springframework.security.config.annotation.web.WebSecurityConfigurer<org.springframework.security.config.annotation.web.builders.WebSecurity>

    @Configuration
    @EnableWebSecurity
    @EnableGlobalMethodSecurity(securedEnabled=true)
    @ComponentScan(basePackages="kr.com.inspect")
    public class SecurityConfig
    extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
    기본적인 웹 인증에 대한 부분을 구현
    Version:
    1.0, 2020.11.24 403 에러 핸들링 추가(Yeonhee Kim)
    Author:
    Yeonhee Kim
    • Constructor Summary

      Constructors 
      Constructor Description
      SecurityConfig()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void configure​(org.springframework.security.config.annotation.web.builders.WebSecurity web)
      특정 url로 접속할 때 인증/인가 처리를 무시
      org.springframework.security.web.authentication.rememberme.PersistentTokenRepository persistentTokenRepository()
      자동 로그인을 위한 DataSource 설정을 위해 PersistentTokenRepository를 Bean에 등록하고 리턴함
      • Methods inherited from class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter

        authenticationManagerBean, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsServiceBean
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SecurityConfig

        public SecurityConfig()
    • Method Detail

      • configure

        public void configure​(org.springframework.security.config.annotation.web.builders.WebSecurity web)
                       throws java.lang.Exception
        특정 url로 접속할 때 인증/인가 처리를 무시
        Specified by:
        configure in interface org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,​org.springframework.security.config.annotation.web.builders.WebSecurity>
        Overrides:
        configure in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
        Parameters:
        web - WebSecurity 객체
        Throws:
        java.lang.Exception - 예외
      • persistentTokenRepository

        @Bean
        public org.springframework.security.web.authentication.rememberme.PersistentTokenRepository persistentTokenRepository()
        자동 로그인을 위한 DataSource 설정을 위해 PersistentTokenRepository를 Bean에 등록하고 리턴함
        Returns:
        PersistentTokenRepository