이끌거나 혹은 따르거나
close
프로필 배경
프로필 로고

이끌거나 혹은 따르거나

  • 분류 전체보기 (92)
    • Java (5)
      • Spring Boot (8)
    • DevOps (17)
      • Git (7)
      • Docker (2)
      • Jenkins (7)
    • Frontend (9)
      • Next.js (4)
      • React (4)
    • 알고리즘 (15)
      • 프로그래머스 (13)
      • LeetCode (2)
    • Dev (23)
      • Database (2)
      • GPT (4)
      • TIP (7)
      • AWS (10)
    • Etc (8)
      • 마시는인생 (3)
      • 구매&사용기 (2)
  • 홈
  • 태그
  • 방명록
[Spring Boot] AOP를 활용한 효과적인 trace 및 로깅 구현 방법

[Spring Boot] AOP를 활용한 효과적인 trace 및 로깅 구현 방법

1. 프론트엔드 TracingTracing은 각 요청에 고유 식별자(traceId)를 부여하고, 이를 애플리케이션의 여러 계층과 서비스를 거치며 따라가는 과정입니다. 이는 복잡한 시스템에서 문제 해결과 성능 최적화에 큰 도움이 됩니다. 프론트엔드에서의 traceId 생성 이점전체 시스템 가시성: 사용자 인터랙션부터 백엔드 처리까지 전 과정을 추적할 수 있습니다.일관된 모니터링: 모든 서비스에서 동일한 traceId를 사용하여 요청을 추적합니다.세션 단위 분석: 사용자 세션 전체에 걸친 활동을 종합적으로 분석할 수 있습니다.2. 구현2.1. React에서 traceId 생성 및 전송프론트엔드 애플리케이션에서 traceId를 생성하고 API 요청에 포함시킵니다.// traceId 생성 유틸리티import {..

  • format_list_bulleted Java/Spring Boot
  • · 2025. 2. 24.
  • textsms
Spring Boot 에서 WebSocket으로 실시간 알림 구현하기

Spring Boot 에서 WebSocket으로 실시간 알림 구현하기

1. WebSocket을 이용한 실시간 알림 기능실시간 알림은 사용자가 새로 고침하거나 업데이트를 반복적으로 수행할 필요 없이 변경된 내용을 즉시 사용자에게 푸시합니다. 채팅앱이나 주식앱, 대시보드 알람같은 기능으로 사용할 수 있습니다. 이번 글에서는 Spring Boot와 WebSocket을 사용하여 실시간 알림 시스템을 구축하는 방법을 보여드리겠습니다. 2. Spring Boot 애플리케이션 설정2.1. 의존성 추가먼저 새 Spring Boot 프로젝트를 생성하거나 기존 프로젝트에 다음 의존성을 추가합니다.dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springfra..

  • format_list_bulleted Java/Spring Boot
  • · 2025. 2. 24.
  • textsms
[Spring] 캐싱 가이드 (@Cacheable, @CachePut, @CacheEvict, @Caching)

[Spring] 캐싱 가이드 (@Cacheable, @CachePut, @CacheEvict, @Caching)

#1. Spring 캐싱캐싱은 자주 요청되는 데이터를 임시로 저장하여 애플리케이션 성능을 향상시키는 데 중요한 방법입니다. 데이터베이스 검색 및 API 요청과 같은 비용이 많이 드는 작업을 줄여 응답 시간을 단축하고, 백엔드 부담을 줄이며, 사용자 경험을 향상시킵니다.  Spring Boot는 캐싱을 간편하게 구현할 수 있도록 다음과 같은 어노테이션을 제공합니다.@Cacheable: 메서드 파라미터를 기반으로 메서드 결과를 캐시합니다.@CachePut: 메서드 결과로 캐시를 업데이트합니다@CacheEvict: 캐시에서 데이터를 제거합니다@Caching: 단일 메서드에 여러 캐싱 어노테이션을 조합할 수 있습니다#2. Spring 캐시 구현Spring Boot 애플리케이션에서 캐싱을 활성화하려면 설정 클래스..

  • format_list_bulleted Java/Spring Boot
  • · 2025. 2. 20.
  • textsms
Spring Boot 3 + Spring Security 6 + JWT 인증

Spring Boot 3 + Spring Security 6 + JWT 인증

#1. 프로젝트 생성Intellij 의 New Spring Boot Project 생성, 혹은 start.spring.io 를 통해 신규 프로젝트를 생성합니다. Dependencies 설정은 아래와 같이 심플하게 시작합니다.  생성된 프로젝트에 추가로 JWT 관련 Dependencies를 추가 해줍니다.implementation 'io.jsonwebtoken:jjwt-api:0.12.6' runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.6' runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.6' 최종 의존성은 아래와 같습니다.dependencies { implementation 'org.springframework.boot:spring..

  • format_list_bulleted Java/Spring Boot
  • · 2025. 2. 6.
  • textsms
javax.inject.Provider 를 사용할 때 UnsatisfiedDependencyException 발생

javax.inject.Provider 를 사용할 때 UnsatisfiedDependencyException 발생

#1. 오류 발생 PrototypeBean을 생성하려고 javax.injext.Provider를 사용하여 설정을 했을 때, org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name '...': Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type 'javax.inject.Provider' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} 라는 오류가 ..

  • format_list_bulleted Java/Spring Boot
  • · 2023. 3. 12.
  • textsms
[Spring Boot] REST API 제작기 - 2.DB연결(Mybatis)

[Spring Boot] REST API 제작기 - 2.DB연결(Mybatis)

이전글 - [Spring Boot] - [Spring Boot] REST API 제작기 - 1.프로젝트 생성 #1. 데이터 소스 연동(Oracle, MS-SQL, H2) 멀티데이터소스 연동을 위해 application.properties 에 아래와 같이 각 db별로 접속정보를 작성한다. # H2 DB 접속정보 spring.datasource.hikari.jdbc-url=jdbc:h2:~/test spring.datasource.hikari.driver-class-name=org.h2.Driver spring.datasource.username=sa # Oracle DB 접속정보(itsvc) spring.itsvc.datasource.hikari.driver-class-name=net.sf.log4jdbc..

  • format_list_bulleted Java/Spring Boot
  • · 2022. 3. 28.
  • textsms
  • navigate_before
  • 1
  • 2
  • navigate_next
전체 카테고리
  • 분류 전체보기 (92)
    • Java (5)
      • Spring Boot (8)
    • DevOps (17)
      • Git (7)
      • Docker (2)
      • Jenkins (7)
    • Frontend (9)
      • Next.js (4)
      • React (4)
    • 알고리즘 (15)
      • 프로그래머스 (13)
      • LeetCode (2)
    • Dev (23)
      • Database (2)
      • GPT (4)
      • TIP (7)
      • AWS (10)
    • Etc (8)
      • 마시는인생 (3)
      • 구매&사용기 (2)
인기 글
최근 댓글
Copyright © 오이가지아빠 All rights reserved.
SKIN: Copyright © 쭈미로운 생활 All rights reserved. Designed by JJuum

티스토리툴바