일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- 자원부족
- 코루틴 빌더
- preemption #
- pytest
- k8s #kubernetes #쿠버네티스
- mp4fpsmod
- Value too long for column
- VARCHAR (1)
- tolerated
- 달인막창
- 코루틴 컨텍스트
- vfr video
- 오블완
- terminal
- 겨울 부산
- JanusWebRTCServer
- kotlin
- Spring Batch
- PytestPluginManager
- JanusGateway
- table not found
- 헥사고날아키텍처 #육각형아키텍처 #유스케이스
- PersistenceContext
- taint
- JanusWebRTC
- 티스토리챌린지
- 개성국밥
- python
- 깡돼후
- JanusWebRTCGateway
목록개발 (101)
너와 나의 스토리
1. 테스트 우선 테스트부터 작성하고 구현하자! 프로그램 설계나 작업 범위 조절에 유용하다. 2. 단언(Assert) 우선 완료된 시스템이 어떨 거라고 정하고 시작. 예: 소켓을 통해 다른 시스템과 통신하려 한다고 가정하자. 요구 조건: 통신을 마친 후 소켓은 닫혀있어야 하고, 소켓에서 문자열 'abc'를 읽어와야 한다. 이를 단언으로 먼저 작성한다. assertTrue(reader.isClosed()); assertEquals("abc", reply.contents()); reply는 어디서 얻어오나? socket에서 얻어온다. -> Socket reader; Buffer reply = reader.contents(); assertTrue(reader.isClosed()); assertEquals("a..
Step 1 설명: 2021.03.15 - [개발/Spring Boot] - [Spring] Thymeleaf 적용해보기 - Step 1. 네비게이션 바, 입력 파라미터 설정 Step 2 코드: github.com/hovy1994/Thymeleaf/tree/step2 입력 form 만들기 이름 성별 홈페이지 주소 에 입력한 값들을 "/profile"로 보낸다. method는 post와 get 두 종류를 사용할 수 있다. 따로 객체 타입을 정의해주지 않아도 알아서 form 값들이 (Profile 객체로) 묶여서 보내지게 된다. @PostMapping("/profile") public String saveProfileInfo(Profile profile) { System.out.println("usernam..
Thymeleaf란? Thymeleaf는 web 및 독립 실행형 환경 모두를 위한 서버 측 Java 템플릿 엔진으로 HTML, XML, JavaScript, CSS 및 일반 텍스트를 처리할 수 있다. Step 1. 네비게이션 바, 입력 파라미터 설정 여기(Github)에 코드가 작성되어 있다. 1. build.gradle에 dependency implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' developmentOnly 'org.springframework.boot:spring-boot-devtools' spr..
필요한 dependency testImplementation group: 'org.mockito', name: 'mockito-inline', version: '3.7.7' Static method public class StaticMethodFunction { public static String getBlogUrl(){ return "https://hororolol.tistory.com/"; } } 위의 static method를 호출할 클래스 public class BlogService { public String getUrl() { return StaticMethodFunction.getBlogUrl(); } } 우리는 이 BlogService를 테스트할 것이고, 여기서 호출하는 StaticMet..
Json 데이터를 받을 때, 일부 필요한 데이터만 추출해서 받고 싶을 때가 있다. 예를 들어, Github webhook을 받는다고 하자. -> Github Webhook 설명 및 사용법 Github webhook의 paylaod는 다음과 같다. { "zen": "Mind your words, they are important.", "hook_id": 283587005, "hook": { "type": "Repository", "id": 283587005, "name": "web", "active": true, "events": [ "push" ], "config": { "content_type": "json", "insecure_ssl": "0", "url": "http://192.168.0.5:808..
"테스트 주도 개발 Test-Driven Development: By Example" 책에 나오는 예제를 실제로 구현해보자." Money.java public class Money { protected int amount; protected String currency; Money(int amount, String currency) { this.amount = amount; this.currency = currency; } Money times(int multiplier) { return new Money(amount * multiplier, currency); } String currency() { return currency; } static Money dollar(int amount) { retur..
"테스트 주도 개발 Test-Driven Development: By Example" 책에 나오는 예제를 실제로 구현해보자. Money.java package com.example.tdd.money; public abstract class Money { protected int amount; abstract Money times(int multiplier); static Dollar dollar(int amount) { return new Dollar(amount); } static Franc franc(int amount){ return new Franc(amount); } public boolean equals(Object object) { Money money = (Money) object; ret..
"테스트 주도 개발 Test-Driven Development: By Example" 책에 나오는 예제를 실제로 구현해보자. 프로그래밍 순서 빨강 - 실패하는 작은 테스트를 작성한다. 처음에는 컴파일조차 되지 않을 수 있다. 초록 - 빨리 테스트가 통과하게끔 만든다. 이를 위해 어떤 죄악을 저질러도 좋다. 죄악: 테스트 통과만을 위해 복붙 하거나 함수에서 임의의 값을 무조건 리턴하게 구현하는 것. 리팩토링 - 2단계에서 생겨난 모든 중복을 제거한다. 예제 1: Money 다중 통화를 지원하는 보고서를 만들어보자. 종목 주 가격 합계 IBM 1000 25USD 25000USD Novartis 400 150CHF 60000CHF 합계 65000USD 기준 변환 환율 CHF USD 1.5 이러한 보고서를 생성..