[Error] org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping

Jin·2023년 9월 4일
0

Error

목록 보기
1/3

스프링 부트와 AWS로 혼자 구현하는 웹 서비스의 스프링 시큐리티를 따라 하던 중, Application run failed org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping 에러가 발생했다. 이 에러는 yaml 파일을 만지면서 발생하는 것으로, 들여 쓰기가 잘못된 경우에 발생할 수 있는 에러이다. 나 같은 경우에는 들여쓰기 문제가 아니라, redirect-url을 작성할 때 url을 ""로 감싸주지 않아서 발생한 에러였다.

스프링 시큐리티 설정 등록(Naver)

spring:
  security:
    oauth2:
      client:
        registration:
          naver:
            client-id: 클라이언트 ID
            client-secret: 클라이언트 Secret
            redirect-uri: "{baseUrl}/{action}/oauth2/code/{registrationId}"
            # ""로 감싸지 않으면 오류 발생함
            authorization-grant-type: authorization_code
            scope:
              - name
              - email
              - profile_image
            client-name: Naver

        provider:
          naver:
            authorization-uri: https://nid.naver.com/oauth2.0/authorize
            token-uri: https://nid.naver.com/oauth2.0/token
            user-info-uri: https://openapi.naver.com/v1/nid/me
            user-name-attribute: response
profile
블로그 이사했습니다! 💨💨 https://guswls28.tistory.com

0개의 댓글