본문 바로가기

전체 글168

java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter springboot 3.0.3 버전으로 jwt 토큰 액세스 필터를 만들던 중 발생한 오류이다. javax/xml/bind/DatatypeConverter java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter at io.jsonwebtoken.impl.Base64Codec.decode(Base64Codec.java:26) at io.jsonwebtoken.impl.DefaultJwtBuilder.signWith(DefaultJwtBuilder.java:99) at mqv.sms.JwtTokenProviderTest.test(JwtTokenProviderTest.kt:25) at java.base/jdk.internal.reflect.Direct.. 2023. 3. 1.
spring rest 서비스중 error 응답에서 trace 제거하기 에러 응답을 보면 여러 메시지가 포함되어 있지만 그중에 trace 부분은 너무 길기도 하고 뭔가 내부 정보가 빠져나가는 것 같아 사용자에게 보여지는 것이 불안하다. 그래서 보통 운영에서는 제거하고 사용한다. 제거하기 위한 간단한 방법을 보자. application.yml 사용시 server: error: include-stacktrace: never application.properties 사용시 server.error.include-stacktrace: never 이제 애플리케이션을 재시작하고 오류를 발생시켜 보면 trace 항목이 사라진걸 확인할 수 있다. 2023. 2. 28.
spring-framework 에서 error 응답 json 으로보내기 스프링 프레임워크 (스프링부트 포함) 에서 REST API 서비스 구축할 때 에러페이지로 리디렉션 되는 경우가 있다. 이럴 때는 에러 처리 부분을 수정해 줄 수 있다. 각종 리졸버를 통한 방법 ResponseStatusEntity 관련한 방법 외에도 여러 방법이 있지만.. 가장 쉽고 빠르게 적용할 수 있는 방법이 있다. import org.springframework.web.bind.annotation.RestControllerAdvice import org.springframework.web.reactive.result.method.annotation.ResponseEntityExceptionHandler @RestControllerAdvice class RestResponseExceptionHandl.. 2023. 2. 28.
최고의 개발자 경험을 구축하기 위한 5가지 팁 (번역) 원본: https://betterprogramming.pub/5-tips-for-building-the-best-developer-experience-possible-879777ffc9d4 5 Tips for Building the Best Developer Experience Possible Developer experience is a thankless part of the software. When it’s good, it’s good. When it’s bad… everybody talks about it and nobody… betterprogramming.pub 개발자 경험은 소프트웨어에서 빼놓을 수 없는 부분입니다. 좋으면 좋은 거죠. 나쁘면... 모두들 이야기만 하고 아무도 사용하지 않습니.. 2023. 2. 19.
GitHub 다계정 사용중 권한 오류 or 접속 불가시 깃 관련 config를 만지다 보면 갑자기 접속이 잘되던 git repository에 접속이 안될 때가 있다. 이때 해결 방법을 알아보자. 회사원 A씨는 회사에서 작업하던 일을 집에서 마무리 하기로 했다. 문제의 발단 집으로 돌아와 회사에서 작업하던 repository를 clone 받아 작업을 하고 git commit을 했다. 그런데 commit을 하고 commit 이력을 보니 자신의 email 주소가 개인 이메일 주소로 되어 있다. 자신의 회사 이메일 주소로 다시 commit 하기 위해 commit을 취소했다. 그리고 작업을 위해 clone 했던 repository 최 상위 디렉토리로 가서 자신의 이메일을 회사 이메일로 바꾸어 다시 push 하려고 했다. # git 현재 디렉토리 사용자 email 변경.. 2023. 2. 11.
Outlook 회의실 API 연동하기 (java example) Outlook은 회의실 예약을 포함하여 일정 관리를 위한 API를 제공합니다. Outlook API에 대해 자세히 알아보려면 다음 페이지를 방문하세요. 마이크로소프트 그래프 API - https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/calendar calendar resource type - Microsoft Graph v1.0 A calendar which is a container for events. It can be a calendar for a user, or the default calendar of a Microsoft 365 group. learn.microsoft.com 여기에서 회의실 예약 방법을.. 2023. 2. 8.