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

장뽕뽕의 개발일기

  • 분류 전체보기 (145)
    • Java (61)
      • Springboot (28)
      • Architecture (0)
      • Algorithm (17)
      • Trouble-Shooting (3)
      • Basic (13)
    • Security (16)
      • 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)
  • 홈
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
Spring Boot - AOP

Spring Boot - AOP

AOP : Aspect Oriented Programming공통 관심 사항(cross-cutting concern) VS 핵심 관심 사항(core concern) 분리 한 가지의 상황을 예를 들어보자면..이 전에 만든 회원 관리 프로젝트에서모든 메서드의 호출 시간을 측정하고 싶다고 할 때..또는 회원 가입 시간, 회원 조회 시간을 측정하고 싶다고 할 때..스프링 컨테이너의 메서드에 전부 시간 측정 로직을 구현해 줘야 됩니다.. 기존 MemberService 메서드  여기서 회원가입(join) 메서드와 회원 조회(findMembers) 메서드의 기능 시간을 측정하는 코드로 수정해 줍니다..  조회할 때 시간이 콘솔로 찍히는 걸 확인할 수 있습니다..  (오른쪽은 웹브라우저 짤린거입니다 ㅋㅁㅋ) 자 다시 돌..

  • format_list_bulleted Java/Springboot
  • · 2025. 3. 4.
  • textsms
  • navigate_before
  • 1
  • 2
  • 3
  • 4
  • 5
  • navigate_next
공지사항
  • 장뽕뽕 사이트를 오픈합니다.
  • 개발 일기 사이트 이전 안내
전체 카테고리
  • 분류 전체보기 (145)
    • Java (61)
      • Springboot (28)
      • Architecture (0)
      • Algorithm (17)
      • Trouble-Shooting (3)
      • Basic (13)
    • Security (16)
      • 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)
최근 글
인기 글
최근 댓글
태그
  • #dothome
  • #phpMyAdmin
  • #html
  • #algorithm
  • #springboot
  • #Spring
  • #javascript
  • #java
  • #SQL
  • #php
전체 방문자
오늘
어제
전체
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바