formLogin 썸네일형 리스트형 spring boot security custom login(2) + aop 지난 번 올렸던 스프링 부트 커스텀 로그인에 수정사항과 추가할 내용이 있어서 남김. 우선. WebSecurityConfigurerAdapter를 상속받아 구현한 configure 메소드의 내용 중.anyRequest().denyAll()로그인전이고 후고 나발이고 antMatchers에 맵핑되어 있지 않은 url은 그냥 아예 모두 허용하지 않는다는 구문이다. 로그인시에는 허용, 비로그인시에는 불허 하려면.anyRequest().authenticated() 로 수정해야 한다. 그리고 이전에는 내 User 빈이 아닌 org.springframework.security.core.userdetails.User(user.getEmail(), user.getPassword(), authories);로 리턴을 했었다... 더보기 spring boot security custom login A. spring security 커스텀 설정을 위해서는 WebSecurityConfigurerAdapter를 상속 받은 Configuration을 구현해야 한다.configure 메소드들을 override해서 custom 환경을 셋팅한다.1. configure(WebSecurity web) : web.ignoring().antMatchers("/resources/**");// 내 경우 webapp/resources 에 css, js, image 파일들을 모아놓았고 jsp 파일은 webapp/WEB-INF/view/에 모아놓았다. 2. configure(HttpSecurity http) : ....antMatchers(...).permitAll() // matcher된 경로들은 모두 허용.anyReque.. 더보기 이전 1 다음