장뽕뽕의 개발일기
close
프로필 배경
프로필 로고

장뽕뽕의 개발일기

  • 분류 전체보기 (153)
    • Java (61)
      • Springboot (28)
      • Architecture (0)
      • Algorithm (17)
      • Trouble-Shooting (3)
      • Basic (13)
    • Security (20)
      • Practice (4)
      • System (7)
      • Network (4)
      • Application (5)
    • Mobile (0)
      • Android (0)
      • Flutter (0)
    • JavaScript (16)
      • Node.js (16)
    • Linux (8)
    • Network (6)
    • Docker (4)
    • Project (5)
      • SecuriSuite (5)
    • Certificate (2)
      • 정보처리기사 (1)
      • 정보보안기사 (1)
    • Legacy (27)
      • JS+PHP+SQL (27)
    • 루트권한 없는 나의 하루 (4)
  • 홈

실시간 로그 모니터링에 대한 문제 + 해결

이 전에 진행했던 JSP 기반의 프로젝트를 Springboot 프로젝트로 리팩토링하면서.. 해결해야 될 문제가 한 개 발생했다.실시간으로 로그를 불러와서 데이터를 원하는 형식에 맞게 정형화 시켜준 뒤, 클라이언트에게 전송하는 단순한 과정인데, 환경이나 요구사항이 까다로웠다. 환경Kali(Debian)에서 운영 중인 Springboot 기반 웹서버 순서도1. 웹서버는 클라이언트의 요청을 받는다.2. 해당 요청에 맞게 프로세스를 처리한다. : 이 과정에서 처리에 대한 로그를 기록함3. 처리 후 결과를 기록한다.4. 기록한 결과와 데이터 형식에 맞춰서 클라이언트에게 반환한다. 여기서 맞닥뜨린 문제점1. 요청에 맞게 프로세스를 처리하는 과정에서, 처리하는 시간이 늘어날수록 응답(response)도 늦어졌다.2...

  • format_list_bulleted Java/Trouble-Shooting
  • · 2025. 3. 11.
  • textsms
MicroService 무중단배포 - 블루그린배포

MicroService 무중단배포 - 블루그린배포

현재 도커에는 총 6개의 Micro Service가 있습니다..각 서비스는..mariadb : 데이터 저장config-server : 설정 집중 관리eureka-server : 모니터링gateway-server : 프록시처리(로드밸런싱 등)authentication-server : JWT 발급 및 인증item-service-server : 아이템 데이터 저장 클라이언트의 요청이 들어왔을 때 1차원적으로 보면gateway - authentication - item-service 순으로 처리가 됩니다. 하지만 여기서 item-service에 기능을 추가하고 싶을 때가 있습니다.버전업을 하는 거죠..예를 들어서..아이템 데이터를 저장하는 기능을 담당하는 item-service에 아이템 조회 기능을 추가하고자 ..

  • format_list_bulleted Java/Springboot
  • · 2025. 3. 10.
  • textsms
Spring Boot - Security 권한 처리

Spring Boot - Security 권한 처리

Spring Security 권한 처리를 해볼게요..  회원 데이터를 몇 개 더 넣고..각 회원 별로 권한을test1 = ROLE_USERtest2 = ROLE_MANAGERtest3 = ROLE_ADMIN이렇게 부여했습니다.이 상황이면,  이렇게 접근이 가능합니다. 여기서, 스프링 시큐리티 설정 파일에서 @EnableGlobalMethodSecurity(securedEnabled = true, prePostEnabled = true) EnableGlobalMethodSecurity 어노테이션을 통해 securedEnabled, prePostEnabled 두 개를 활성화시켜주고  @Secured("ROLE_ADMIN") @GetMapping("info") public @ResponseBo..

  • format_list_bulleted Java/Springboot
  • · 2025. 3. 9.
  • textsms
Spring Boot - Security 로그인

Spring Boot - Security 로그인

Spring Security 로그인 처리를 해볼게요.. 먼저. 시큐리티 설정 메서드에서   @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().disable(); http.authorizeRequests() .antMatchers("/user/**") .authenticated() .antMatchers("/manager/**").access("hasRole('ROLE_ADMIN') or hasRole('ROLE_MANAGER')") .antMatchers("/adm..

  • format_list_bulleted Java/Springboot
  • · 2025. 3. 9.
  • textsms
Spring Boot - Security 회원가입

Spring Boot - Security 회원가입

회원가입 처리와 동시에 비밀번호를 암호화시켜서 DB에 저장까지 해볼게요.. 먼저, 로그인 페이지와 회원가입 페이지를 만들어줬습니다.. 로그인 페이지 ID : PW : 회원가입 하러가기회원가입 페이지 ID : PW : Email : 로그인 하러가기 그리고 user 모델을 생성해 줍니다.. package com.cos.security1.model;import lombok.Data;import org.hibernate.annotations.CreationTimestamp;import javax.persistence...

  • format_list_bulleted Java/Springboot
  • · 2025. 3. 8.
  • textsms
Spring Boot - Security 필터 체인 등록

Spring Boot - Security 필터 체인 등록

해당 프로젝트는 로그인, 회원가입에 따라 회원별 권한을 부여합니다..비회원, 유저, 매니저, 어드민 총 4개의 계층으로 나누어져 있습니다..  현재까지의 구조는 다음과 같습니다.. dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' im..

  • format_list_bulleted Java/Springboot
  • · 2025. 3. 8.
  • textsms
  • navigate_before
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • ···
  • 10
  • navigate_next
공지사항
  • 장뽕뽕 사이트를 오픈합니다.
  • 개발 일기 사이트 이전 안내
전체 카테고리
  • 분류 전체보기 (153)
    • Java (61)
      • Springboot (28)
      • Architecture (0)
      • Algorithm (17)
      • Trouble-Shooting (3)
      • Basic (13)
    • Security (20)
      • Practice (4)
      • System (7)
      • Network (4)
      • Application (5)
    • Mobile (0)
      • Android (0)
      • Flutter (0)
    • JavaScript (16)
      • Node.js (16)
    • Linux (8)
    • Network (6)
    • Docker (4)
    • Project (5)
      • SecuriSuite (5)
    • Certificate (2)
      • 정보처리기사 (1)
      • 정보보안기사 (1)
    • Legacy (27)
      • JS+PHP+SQL (27)
    • 루트권한 없는 나의 하루 (4)
최근 글
인기 글
최근 댓글
태그
  • #Spring
  • #SQL
  • #dothome
  • #springboot
  • #algorithm
  • #phpMyAdmin
  • #java
  • #javascript
  • #html
  • #php
전체 방문자
오늘
어제
전체
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바