내일배움캠프 4기 스프링/내배캠 TIL📘

02. 01 TIL

wannaDevelopIt 2023. 2. 1. 20:43
728x90

1. 코딩 테스트 입문

합성수 찾기

chatGPT의 제안을 따라 sqrt를 활용한 합성수 찾기 알고리즘을 작성해봤다.

엥 근데 메모리와 시간을 더 먹는 걸?

2. CD 오류 해결

구글링해도 영 결과가 별로였던 Process completed with exit code 255에 대해 chatGPT에게 물어보고, 로그를 차례로 해결해보라는 말에 'save-state'와 'set-output' commands의 deprecated에 대비한 개선 : 

https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

https://blog.outsider.ne.kr/1651

하지만 난 저 두 명령어를 쓰지 않았다. 로그를 잘못 확인한 것 -> 로그 다시 확인

appspec.yml을 찾을 수가 없어 발생한 오류였던 것이다, 나는 당연히 카멜케이스로 썼던 바람에 생긴 해프닝들이었다.

앞으로 깃헙 액션 로그 확인할 땐 :

추가 의문 : AWS 인스턴스가 중지되어 있는 상태인데 배포가 정상적으로 이루어진다?

To deploy your project in GitHub even when the AWS instance has been paused, you can use AWS CodeDeploy. CodeDeploy is a fully managed deployment service that automates application deployments to Amazon EC2 instances, on-premises instances, and even to instances running in a different cloud. Here's a high-level overview of the steps you would need to take to set up CodeDeploy and deploy your project:

  1. Create an AWS CodeDeploy Application: You need to create a CodeDeploy application to define the settings and parameters for your deployment.
  2. Create an EC2 instance: You need an EC2 instance to host your code. You can either launch a new EC2 instance or use an existing one.
  3. Register your EC2 instance with your CodeDeploy application: You need to register your EC2 instance with your CodeDeploy application to make sure that it's included in the deployment group.
  4. Create a CodeDeploy Deployment Group: A deployment group is a set of individual instances, CodeDeploy makes deployments to, either in EC2 or on-premises.
  5. Create a Deployment: You need to create a deployment to deploy your code to your instances.
  6. Package and upload your code: You need to package your code and upload it to Amazon S3 or GitHub.
  7. Deploy your code: CodeDeploy takes your code and deploys it to the instances in the deployment group.

CodeDeploy can automatically deploy your code even if your instances are paused, as it only deploys to instances that are currently running. When you start your instances again, CodeDeploy will deploy your code to the newly started instances. 

-> 코드 디플로이가 인스턴스가 중지를 풀고 다시 실행하면, 자동으로 그 코드를 다시 디플로이 해줄 것이다?

나중에 확인해보자

3. JPA 심화

생활코딩 - 도커 강의

https://www.youtube.com/watch?v=Ps8HDIAyPD0&list=PLuHgQVnccGMDeMJsGq2O-55Ymtx0IdKWf 

docker pull image

docker run --name image

docker start/stop container

docker ps( -a)

docker rm(i)

 

ORM의 탄생배경

JDBC 방식으로 실습해보기

-> 중복코드 발생, 예외처리를 DB별로 할 수 없음, 자원 관리를 따로 해줘야한다

~ QueryMapper : SQL Mapper, ORM cf)MyBatis : 이전 전자정부 표준이었다

 

JDBC Templeate 실습

MyBatis 실습

https://lotuus.tistory.com/75

 

[MyBatis] 동작원리, 사용방법 정리

목차 MyBatis 등장배경 [JDBC] 사용방법 JDBC : JAVA DataBase Connectivity 기존 자바에서는 DB를 조작하기 위해서 JDBC API를 사용했다. JDBC는 데이터베이스 종류에 상관없이 JDBC만 알면 어떤 데이터베이스를

lotuus.tistory.com

728x90

'내일배움캠프 4기 스프링 > 내배캠 TIL📘' 카테고리의 다른 글

02. 03 TIL  (0) 2023.02.03
02. 02 TIL  (0) 2023.02.02
01. 31 TIL  (0) 2023.01.31
01. 30 TIL  (0) 2023.01.30
01. 27 TIL  (0) 2023.01.27