본문 바로가기 메뉴 바로가기

호돌맨의 블로그

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

호돌맨의 블로그

검색하기 폼
  • 분류 전체보기 (28)
    • 음악 (1)
    • 해외여행 (7)
      • [2018-01] 홋카이도 (2)
      • [2017-12] 홋카이도 (5)
    • 국내여행 (0)
    • 개발 (20)
      • Linux,Server (6)
      • Java,Spring (4)
      • Frontend (2)
      • Python (0)
      • Database (1)
      • 인생후진기어 (3)
  • 방명록

spring (3)
SpringSecurity에서 anonymous()

Spring에서 테스트를 돌리는 중 Unauthorized(401)가 아닌 Forbidden(403)이 발생하는 문제가 생겼다. @RestController @RequiredArgsConstructor public class PostController { private final PostService postService; @PreAuthorize("isAuthenticated()") @PostMapping("/api/bbs/{name}/posts") public void post(@PathVariable String name, @Valid @RequestBody WritePost request, @AuthenticationPrincipal ExternalUser externalUser) { postSe..

개발/Java,Spring 2019. 8. 15. 17:50
Spring Boot 2.x Security에서 hasPermission 사용

Spring Boot2.x에서 Spring Security를 이용해 권한을 관리 할 수 있다. 기본적으로 Override된 configure(HttpSecurity http)에서 AntMatcher를 이용해 Role확인을 할 수 있다. 하지만 관리 대상과 요구사항이 많아지면 Role만으로는 문제 해결이 용이하지 않다. 그래서 MethodSecurity를 이용한 권한 관리 방법을 간략히 정리한다. Gradle 설정 compile("org.springframework.boot:spring-boot-starter-security") compile("org.springframework.security:spring-security-oauth2-client") compile("org.springframework.s..

개발/Java,Spring 2019. 8. 11. 15:27
SpringBoot Batch에서 JobParameter로 받을 수 있는 Type

개요 SpringBoot Batch에서 JobParameter로 받을 수 있는 타입에 대하여 이야기 합니다. 이슈 SpringBoot Batch 실행 시 JobParameter로 받을 수 있는 타입은 한정되어 있다. String, Boolean, Integer, Date. 하지만 지금은 2019년.. Date는 상당히 골치아프다. 나는 LocalDate를 사용하고 싶었다. 그래서 아래와 같이 JobParameter를 받아줄 수 있는 Class를 만들었다. public class MyJobParameter { @Value("#{jobParameters[requestDate]}") private LocalDate requestDate; public void setRequestDate(String reques..

개발/Java,Spring 2019. 5. 17. 12:40
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
  • Vue.js 간단한 플러그인⋯
  • Elasticsearch 기본 쿼리
  • 모던 레거시가 되지 않기⋯
  • 맥에서 zip 압축해제 오류⋯
최근에 달린 댓글
  • 그냥 적어본건데.. 도움이 되⋯
  • 덕분에 찾고 있던 문제가 해⋯
  • ㅎㅎㅎㅎ안녕하세요. 다 망해⋯
  • 개발바닥 유튜브 보다가 왔습⋯
Total
26,801
Today
49
Yesterday
96
링크
TAG
  • spring
  • 우아한형제들
  • splitChunks
  • disable
  • upstream
  • hasPermission
  • Spring Security
  • 우아한테크세미나
  • 오누마당고
  • 유효하지 않은 변수
  • unzip
  • 에키벤
  • 슈퍼호쿠토
  • nginx
  • spring batch
  • installed date
  • Illegal byte sequence
  • 홋카이도
  • isAuthorized
  • 강대명
  • 개발자
  • job parameter
  • Method Security
  • 미나미 치토세
  • PreAuthorize
  • 스프링배치
  • forbidden
  • innobackupex
  • xbstream
  • 설치일자
more
«   2021/02   »
일 월 화 수 목 금 토
  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            
글 보관함
  • 2020/11 (1)
  • 2020/08 (2)
  • 2020/04 (1)
  • 2020/01 (3)

Blog is powered by Tistory / Designed by Tistory