Section 4: Users Microservice 1 - KwangtaekJung/MSA-SpringCloud-user-service GitHub Wiki

Users Mocroservice 1

Users Microservice κ°œμš”
Users Microservice ν”„λ‘œμ νŠΈ 생성
Users Microservice DB
Users Microservice νšŒμ› κ°€μž…
Users Microservice Security

Users Microservice κ°œμš”

  • APIs
κΈ°λŠ₯ URI(API Gateway μ‚¬μš© μ‹œ) URI(API Gateway λ―Έ μ‚¬μš© μ‹œ) HTTP Method
μ‚¬μš©μž 정보 등둝 /user-service/users /users POST
전체 μ‚¬μš©μž 쑰회 /suer-service/users /suers GET
μ‚¬μš©μž 정보, μ£Όλ¬Έ λ‚΄μ—­ 쑰회 /user-service/users/{user_id} /users/{user_id} GET
μž‘λ™ μƒνƒœ 확인 /user-service/suers/health_check /users/health_check GET
ν™˜μ˜ λ©”μ‹œμ§€ /user-service/users/welcome /users/welcome GET

Users Microservice ν”„λ‘œμ νŠΈ 생성

  • Dependencies
    • DevTools, Lombok, Web, Eureka Discovery Client
    • Spring Boot 2.4.1

Users Microservice DB

  • H2 Database
    • μžλ°”λ‘œ μž‘μ„±λœ μ˜€ν”ˆ μ†ŒμŠ€ RDBMS
    • Embedded, Server-Client κ°€λŠ₯
    • JPA 연동 κ°€λŠ₯
    • h2.1.4.198 이 ν›„ λ²„μ „λΆ€ν„°λŠ” λ³΄μ•ˆ 문제둜 μžλ™μœΌλ‘œ λ°μ΄ν„°λ² μ΄μŠ€ μƒμ„±ν•˜μ§€ μ•ŠμŒ.

Users Microservice νšŒμ› κ°€μž…

Users Microservice Security

  • Authentication + Authorization
  • BCryptPasswordEncoder
    • Passwordλ₯Ό ν•΄μ‹± ν•˜κΈ° μœ„ν•΄ Bcrypt μ•Œκ³ λ¦¬μ¦˜ μ‚¬μš©
    • 랜덀 Saltλ₯Ό λΆ€μ—¬ν•˜μ—¬ μ—¬λŸ¬ 번 Hashλ₯Ό μ μš©ν•œ μ•”ν˜Έν™” 방식