일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- ioc컨테이너
- 스프링 시큐리티 설정
- 비기능적 요구사항
- IOC
- jpa lazy
- spring formatter
- open-session-in-view
- 스프링 포매터
- 동적파라미터
- 그래프큐엘
- fetch join
- jpa no session
- 스프링부트 도커
- 수정자주입
- 토비의 스프링
- 자바 필터
- 스프링시큐리티
- java predicate
- 소프트웨어의 품격
- kotlin ::
- 도커 이미지 빌드
- Spring
- 스프링
- Atomicity
- kotlin 리팩터링
- method refetence
- 기능적 요구사항
- 정적팩토리메서드
- 스프링di
- 생성자주입
- Today
- Total
목록Spring (34)
공부기록

1018 spring security ignoring() 예를 들어 favicon 같은 스태틱한 리소스인 경우는 시큐리티 필터를 타게할 필요가 없다. favicon을 보여주는데 무슨 인증이 필요하겠나? 하지만 별도의 설정이 없다면 favicon 요청마저 시큐리티 필터들을 타게되고, 그만큼의 자원이 낭비된다. 이런 경우 시큐리티필터를 안타게하려면 어떻게 해야할까? SecurityConfig.java @Override public void configure(WebSecurity web) throws Exception { web.ignoring().mvcMatchers("/favicon.ico") } 부트 쓸 경우 SecurityConfig.java @Override public void configure(W..
1014 스프링mvc formatter Formatter ? 문자열을 객체로 변환시키거나 객체를 문자열로 변환해주는 일을 한다. Person.java @Getter @Setter public class Person { private String name; } SampleController.java @RestController public class SampleController { @GetMapping("/hello/{name}") public String helloPathVariable(@PathVariable("name") Person person) { return "hello this is pathVar. "+person.getName(); } @GetMapping("/hello") public S..
Authentication과 SecurityContextHolder 위에서 AuthenticationManager가 인증을 마친 뒤 Authentication 리턴해준다고했다. 그렇다면 리턴된 Authentication은 어디로 가는걸까? UsernamePasswordAuthenticationFilter 폼인증을 처리하는 시큐리티필터. 인증된 Authentication 객체를 SecurityContextHolder에 넣어주는 필터. SecurityContextHolder.getContext().setAuthentication(authentication) Filter와 FilterChainProxy. FilterChainProxy가 Filter들을(UsernamePasswordAuthenticationFi..
SecurityContextHolder SecurityContextHolder - SecurityContext - Authentication SecurityContextHolder는 쓰레드로컬. Authentication principal 누구에 해당하는 정보 UserDetailsService에서 리턴한 객체 Object 타입이긴 하지만, UserDetailsService에서 리턴한 값이기 때문에 사실상 UserDetails 타입. authrities "ROLE_USER", "ROLE_ADMIN" 등 Principal이 가지고 있는 '권한' 인증 이후 인가 및 권한 확인할 때 이 정보를 참조한다. UserDetailsService 유저정보를 UserDetails 타입으로 가져오는 DAO인터..