전체 글
-
ThreadLocal이란?Spring Framework 2023. 5. 19. 00:01
ThreadLocal이란? 멀티스레드 애플리케이션에서 변수를 특정 스레드에 로컬로 설정할 수 있는 프로그래밍 개념입니다. 즉, 스레드 로컬 변수는 변수에 액세스 하는 각 스레드마다 다른 값을 가질 수 있는 변수입니다. 각 스레드는 다른 스레드에 속한 복사본에 영향을 주지 않고 변수의 자체 복사본의 읽고 수정할 수 있습니다. Java에서는 ThreadLocal 클래스를 사용하여 스레드 로컬 변수를 선언할 수 있습니다. Thread Local의 활용 일반적으로 멀티스레드 애플리케이션에서 사용자의 세션 데이터나 스레드의 현재 상태와 같이 특정 스레드에 특정한 데이터를 저장하는 데 사용됩니다. Spring Security에서 Thread Local을 활용하여 사용자 인증 정보를 전파 매개변수로 전달할 필요 없이..
-
OpenAPI Specification으로 API-First 개발하기프로젝트/선착순 쿠폰 발급 시스템 2023. 5. 18. 00:01
개요 OpenAPI Specification 3.0을 기준으로 문서의 스펙을 작성하고 이를 토대로 문서와 코드를 생성해보고자 합니다. 이를 위한 여러 가지 개념들을 파악하고 Swagger RestDocs등과는 어떻게 다른지 알아보고자 합니다. 더 나아가서 OpenAPI Specification으로 문서와 코드를 만들어봅니다. OpenAPI Specification이란 무엇일까? 공식문서는 다음과 같이 말합니다. OAS는 HTTP API에 대한 프로그래밍 언어에 독립적입니다. 컴퓨터와 사람 모두 이해할 수 있으며 최소한의 구현 논리로 API 소비자가 이해할 수 있도록 상호작용할 수 있습니다. OpenAPI 와 Open API의 차이점 Open API는 단어 그대로 "개방된 API"입니다. 즉, 누구나 사용..
-
유지보수하기 좋은 코드를 구현하는 방법 - 박재성(자바지기)세미나, 영상 요약정리 2023. 5. 17. 00:01
유지보수하기 좋은 코드를 구현하는 역량과 개발 문화 어떻게 만들 것인가? - 박재성(자바지기) 달리는 마차에 바퀴를 갈아끼는 것은 고통스럽고 힘든 일일 수 있지만 중요하다. 맹목적으로 믿는 것이 가장 위험하다. 항상 의심하는 습관을 들인다. 변화는 어떻게 만들 것인가? 회고문화, 코드리뷰문화 문화등을 어떻게 만들것인가 개인의 변화를 만들어 성장하고 다른 사람들에게 영향을 미치도록 하자. 하지만 개인의 변화는 어렵고 다른 사람들을 변화시키는 것은 훨씬 어렵다. 개인의 변화 의지력이 아닌 환경이 중요하다 ex) 꾸준히 학습에 투자하고 싶다 -> 퇴근 후 스터디 카페로 퇴근한다. 투자 -> 비싼 교육, PT 사회적 압력 - 공개적인 약속 책임감 - 리더, 아이 등 의식적인 연습 치아를 닦는 것을 계속한다고 해..
-
Sign In with Apple REST API 문서 정리프로젝트/WebRTC 화상통화 프로젝트 2023. 5. 16. 00:01
[1] Sign In with Apple REST API 문서 정리 [2] Rest API로 Apple 로그인 구현 개요 Apple 로그인을 구현하기 위해 공식 문서를 읽어보면서 정리하는 시간을 가져보고자 합니다. https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api Sign in with Apple REST API | Apple Developer Documentation Communicate between your app servers and Apple’s authentication servers. developer.apple.com Apple 로그인으로 사용자 인증하기 Apple ID Server..
-
Spring actuator란?모니터링 2023. 5. 15. 00:01
Spring Actuator란? Spring Boot 애플리케이션의 운영 정보와 모니터링을 제공하는 라이브러리입니다. Actuator를 사용하면 애플리케이션의 상태 정보를 쉽게 확인할 수 있으며, 실행 중인 애플리케이션의 로그, 메모리 사용량, HTTP 요청 수 등의 정보를 수집할 수 있습니다. gradle 의존성 implementation("org.springframework.boot:spring-boot-starter-actuator") application.yml 설정 # actuator 설정 management: endpoints: web: exposure: include: - "info" - "health" 위의 설정은 Actuator 엔드포인트 중 info와 health 엔드포인트를 노출하는 ..
-
Kotlin으로 Jwt 개발하기Kotlin 2023. 5. 14. 00:01
개요 이전에 Java를 통해 jjwt0.9.1 라이브러리로 jwt를 구현했던 내용이 담겨있으며, jwt에 대한 기본적인 개념들이 정리되어 있는 글입니다. https://junuuu.tistory.com/307 JWT란? JWT 원리, 사용법 JWT란? JWT란 Json Web Token의 약자로써 Json 포맷을 이용하여 사용자에 대한 속성을 저장하는 Claim 기반의 Web Token입니다. Claim이란 사용자 정보나 데이터 속성 등을 의미합니다. 즉, Claim 토큰이라 하면 junuuu.tistory.com 하지만 Kotlin을 기준으로 작성해보고자 했을 때 다음과 같은 에러가 발생했습니다. java.lang.UnsupportedOperationException at java.base/java.u..
-
Github Actions로 CI/CD 구축하기Git 2023. 5. 13. 00:01
[1] Github Actions로 CI 구축하기 [2] Github Actions로 CD 구축하기 Github Action이란? 코드저장소로 유명한 Github에서 제공하는 CI(Continuous Integration, 지속통합)와 CD(Continuous Deployment, 지속배피)를 위해 추가된 서비스입니다. 다른 서드파티를 사용하는 것보다 관리해야 할 포인트가 줄어드는 이점을 가질 수 있습니다. 쉽게 생각해서 github이 호스팅 하는 컴퓨터 한 대를 대여하여 CI/CD를 편하게 할 수 있습니다. Github에서 코드 저장소를 무료로 만들 수 있으며 코드 저장소에 어떤 이벤트(event)가 발생했을 때 특정 작업이 일어나게 하거나 주기적으로 어떤 작업들(workflows)을 반복해서 실행시킬..
-
vue.js spring boot server와 통신하기프로젝트/vue.js 2023. 5. 12. 00:01
[1] intelliJ로 vue.js 프로젝트 시작하기 [2] vue.js spring boot server와 통신하기 개요 1편을 통해 vue.js로 프로젝트를 시작해 보고 이제 2편에서는 spring boot server와 api 통신을 수행해보고자 합니다. Axios 라이브러리 설치하기 npm install axios added 6 packages, and audited 967 packages in 839ms npm ls axios axios@1.3.4 vue.js에서 Spring Boot 서버와 통신하기 위해서는 Axios 라이브러리를 사용할 수 있습니다. Axios는 Promise 기반의 HTTP 클라이언트 라이브러리로, 간단한 설정으로 HTTP 요청을 보낼 수 있습니다. npm ls axios..