TIL

[코드스테이츠] Day05 BE

yerinpark 2023. 6. 30. 17:14
  1. 학습 목표
    1. Business Layer
    2. Persistence Layer
    3. AOP
  2. 실습
    1. Member 도메인에 대한 CRUD
      • 조건 1 : DB가 아닌 List를 사용
      • 조건 2 : Grade enum 대신 String을 사용
    2. Postman으로 동작을 확인한다.
    3. bootJar로 빌드하고 수동 실행하여 정상적인 서비스 동작을 확인한다.
    4. Docker 이미지로 만들고 어제 만든 도커 허브 저장소에 0.0.2 버전으로 push한다.
    5. push한 0.0.2 버전을 pull하여 내 도커에 내려받고 컨테이너 방식으로 동작시킨 후 정산 서비스 동작을 확인한다.
    6. 개인 github에 Commit & Push하고 Readme 파일에 도커 허브 주소를 기입한다.
  3. 과제
    1. (실습 안내 a~f 과정) 끝내지 못한 실습 완성 + 새 프로젝트 만들어서 다시 복습
    2. 블로그 포스팅

 

Aspect Oriented Programming vs. Object Oriented Programming

필드 = 값

메서드 = 동작

자동차, 배, 사람

그 연결점이 과연 무엇인가? 프록시 패턴에서 발전함.

https://velog.io/@newtownboy/디자인패턴-프록시패턴Proxy-Pattern

AOP vs. OOP : AOP는 보다 더 객체지향적인 프로그래밍을 하기 위함.

aop의 목적은 로그 기록, 권한 체크를 위함.

 

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

새로운 기능 및 개선 사항에 대 한 최신 PowerShell을 설치 하세요! https://aka.ms/PSWindows

PS D:\PRJ_2023\codestates\day4> docker build -t yerinpark0208-spring .
ERROR: error during connect: this error may indicate that the docker daemon is not running: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/_ping": open //./pipe/docker_engine: The system c
annot find the file specified.

/* docker 실행 후 명령어 실행 */

PS D:\PRJ_2023\codestates\day4> docker build -t yerinpark0208-spring .
[+] Building 2.3s (8/8) FINISHED

... 

PS D:\PRJ_2023\codestates\day4>

 

Microsoft Windows [Version 10.0.22621.1848]
(c) Microsoft Corporation. All rights reserved.

C:\Users\ifiam>docker images
REPOSITORY                 TAG       IMAGE ID       CREATED        SIZE

C:\Users\ifiam>docker tag yerinpark0208-spring:0.0.1 yerinpark0208/spring:0.0.1

C:\Users\ifiam>docker run -p 8080:8080 yerinpark0208/spring:0.0.1

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::               (v2.7.13)
...

map.id = 1
map.name = Rick
map.grade = A
id = 1
{id=1, name=Rick, grade=A}

C:\Users\ifiam>docker ps -a

C:\Users\ifiam>docker push yerinpark0208/spring:0.0.1
The push refers to repository [docker.io/yerinpark0208/spring]

C:\Users\ifiam>docker push yerinpark0208/spring:0.0.2
The push refers to repository [docker.io/yerinpark0208/spring]
tag does not exist: yerinpark0208/spring:0.0.2

C:\Users\ifiam>docker tag yerinpark0208-spring:0.0.1 yerinpark0208/spring:0.0.2

C:\Users\ifiam>docker push yerinpark0208/spring:0.0.2
The push refers to repository [docker.io/yerinpark0208/spring]
...

C:\Users\ifiam>docker pull yerinpark0208/spring:0.0.2

 

'TIL' 카테고리의 다른 글

[코드스테이츠] Day07 BE  (0) 2023.07.05
[코드스테이츠] Day06 BE  (0) 2023.07.03
[코드스테이츠] Day04 BE  (0) 2023.06.29
[코드스테이츠] Day03 BE  (0) 2023.06.29
[코드스테이츠] Day02 BE  (0) 2023.06.28