전체 글
-
[CI] Jenkins 와 Github Webhook 으로 PR 유효성 체크하기개발 2021. 12. 29. 18:06
"CI"는 개발자를 위한 자동화 프로세스인 지속적인 통합(Continuous Integration)을 의미합니다. CI를 성공적으로 구현할 경우 애플리케이션에 대한 새로운 코드 변경 사항이 정기적으로 빌드 및 테스트되어 공유 리포지토리에 통합되므로 여러 명의 개발자가 동시에 애플리케이션 개발과 관련된 코드 작업을 할 경우 서로 충돌할 수 있는 문제를 해결할 수 있습니다. 보통 코드를 개발한 뒤 원격 서버에 배포를 하기 위해서는 다음과 같은 과정을 거친다. 각 단계에서 개발 툴들이 어떤 역할을 하는지는 여기를 체크하자. 이 포스팅에서는 오로지 CI 에 대해서만 다룬다. 코드를 지속적으로 통합하기 위해서는 개발자가 각자 로컬에서 작업한 코드 변화에 대해서 시스템 안정성이 보장되느냐가 매우 중요하다. 특히 어..
-
[JPA] Primary Key가 아닌 필드를 참조하는 Foreign Key 를 만들때개발 2021. 12. 12. 17:27
Primary Key가 아닌 필드를 참조하는 Foreign Key 를 만들때 @JoinColumn(referencedColumnName = [참조하는 필드 이름]) 오류 상황 Stock 이라는 테이블과 DailyStock 이라는 데이터 필드의 일대다(1:N) 매칭 시 일어난 문제이다. Price 는 Stock 의 tickerSymbol 이라는 필드를 참조하고 있다. Price @Entity public class Price { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "price_id") private Long priceId; @ManyToOne @JoinColumn(name = "ticker_symbol") priva..
-
[TDD] TDD 로 알고리즘 문제 풀어보기 - 프로그래머스 42626, 더 맵게개발 2021. 10. 31. 17:57
TDD 로 알고리즘 문제 풀어보기 - 프로그래머스 42626 단기적인 목표로는 Spring Reactive 앱을 TDD 로 구현하는 것이 목표이다. 그런데 TDD 개발 자체가 손에 익지 않아서 처음부터 적용하기에는 무리가 있다. 알고리즘 코딩테스트 문제들은 input 과 output 의 명세가 명확하다. 따라서 tdd 연습에 매우 적합하다고 생각했다. 프로그래머스 42626 번 문제 문제 분석 문제의 핵심은 가장 작은 숫자와 두번째로 작은 숫자를 계속 섞다가, 더이상 섞을 수 없는 지점을 정의하는 것이다. 따라서 먼저 함수의 테스트가 필요한 경우의 수를 잘게 쪼개서 리스트업 해보았다. 테스트 조건 가장 작은 원소를 똑바로 고르는가 두번째로 작은 원소를 똑바로 고르는가 1, 2의 결과를 섞을 때 올바른 연..