전체 글
-
숫자야구게임 구현(1)공부/자바 플레이그라운드 with TDD, 클린코드 2022. 2. 13. 20:25
TDD가 익숙치 않아 프로덕션 코드를 구현하고 단위 테스트를 적용시켜 버렸다.. 숫자야구게임 피드백을 보고 다시 구현할 것이다. BaseBallGameTest public class BaseBallGameTest { @ParameterizedTest @CsvSource({ "845,낫싱", "891,1볼", "137,포볼", "123,1볼 1스트라이크", "723,2스트라이크", "713,3개의 숫자를 모두 맞히셨습니다! 게임 종료" }) void baseBallGameCoreTest(String input, String expected) throws Exception { BaseBallGameCore bbgc = new BaseBallGameCore("713"); bbgc.calc(input); ass..
-
단위 테스트 실습 - 문자열 계산기공부/자바 플레이그라운드 with TDD, 클린코드 2022. 2. 13. 17:15
github 테스트 코드 public class StringCalculatorTest { @ParameterizedTest @CsvSource({ "1 + 2,3", "3 * 5,15", "10 / 5,2", "2 + 3 * 4 / 2,10", "5,5" }) @DisplayName("문자열로 들어온 계산식 테스트") void execute(String str, int expectedResult) throws Throwable { assertThat(new StringCalculator(str).parse().calc()).isEqualTo(expectedResult); } static Stream exceptionTestParameters() { return Stream.of( Arguments.of(..
-
객체 지향 생활 체조 원칙공부/자바 플레이그라운드 with TDD, 클린코드 2022. 2. 3. 23:53
너무 혼자 구글 검색과 디버그를 통해 공부해왔다. 그로인해 시간이 너무 많이 걸리고, 혼자만의 생각에 빠지는 듯 하다. 다른사람의 지식을 돈으로사서 시간도 아끼고 다른사람의 생각도 알아보자. 독학을 통해 단편적인 지식만 가지고있어서, 제대로 한번 배워보고자 한다. 자바 플레이그라운드 with TDD, 클린코드 객체 지향 생활 체조 원칙 한 메서드에 오직 한 단계의 들여쓰기만 한다. else 예약어를 쓰지 않는다. 모든 원시 값과 문자열을 포장한다. 한 줄에 점을 하나만 찍는다. 줄여 쓰지 않는다(축약 금지). 모든 엔티티를 작게 유지한다. 3개 이상의 인스턴스 변수를 가진 클래스를 쓰지 않는다. 일급 컬렉션을 쓴다. getter/setter/프로퍼티를 쓰지 않는다.
-
[QueryDsl] QEntity 연관관계 초기화 2Depth 이상 적용시키기개발/Spring Boot 2021. 10. 1. 18:19
https://querydsl.com/static/querydsl/4.2.1/reference/html/ch03s03.html#d0e2181 3.3. Code generation The Java 6 APT annotation processing functionality is used in Querydsl for code generation in the JPA, JDO and Mongodb modules. This section describes various configuration options for the code generation and an alternative to APT usage. 3.3.1. Path initi querydsl.com By default Querydsl initializ..
-
Mybatis Interceptor 자동 Paging처리 사용방법개발/Spring Boot 2021. 4. 24. 13:53
Github 소스코드보기 Notion으로 보는것을 추천 Mybatis Interceptor 자동 Paging처리 만들기(1) 바로가기 Mybatis Interceptor 자동 Paging처리 만들기(2) 바로가기 ♣️미리보기 H2 Database Table Data HTTP GET 통신 return 값 { "list": [ { "num": 1, "id": "test1", "pw": "test1", "name": "테스트1" }, { "num": 2, "id": "test2", "pw": "test2", "name": "테스트2" } ], "pageInfo": { "page": 1, "size": 2, "totalCount": 3 } } ♦ Controller 매개변수 PageInfo 상속 @RestCon..
-
Mybatis Interceptor 자동 Paging처리 만들기(2)개발/Spring Boot 2021. 4. 20. 17:44
Github 소스코드보기 Notion으로 보는것을 추천 Mybatis Interceptor 자동 Paging처리 만들기(1) 바로가기 ⚫Interceptors PrepareInterceptor @Override public Object intercept(Invocation invocation) throws Throwable { try { StatementHandler statementHandler = (StatementHandler) invocation.getTarget(); MetaObject metaStatementHandler = MetaObject.forObject(statementHandler, DEFAULT_OBJECT_FACTORY, DEFAULT_OBJECT_WRAPPER_FACTORY, ..
-
Mybatis Interceptor 자동 Paging처리 만들기(1)개발/Spring Boot 2021. 4. 19. 17:09
Github(https://github.com/rldhks8745/spring-boot-practice) Notion(https://www.notion.so/Mybatis-Interceptor-Paging-35a3e8b167ad47eca25acb56f1fb9795) - Notion Base로 작성된 글이기 때문에 Notion으로 보시기를 추천드립니다. Mybatis Interceptor 자동 Paging처리 만들기(2) 바로가기 ♣️미리보기 H2 Database Table Data HTTP GET 통신 return 값 { "list": [ { "num": 1, "id": "test1", "pw": "test1", "name": "테스트1" }, { "num": 2, "id": "test2", "pw": ..
-
[Nuxt.js] nuxt.config.js proxy module 설정 주의사항개발/Nuxt.js 2021. 1. 13. 17:18
문제발생 "/apis/services"페이지 클라이언트 단 웹브라우저 새로고침시 404 발생 router.js에 의해 클라이언트단 에서는 /apis/services에 대한 페이지 이동이 된다. 그러나 새로고침 시 nuxt로 요청이 날아오기 때문에 nuxt.config.js의 proxy 설정에 의해 /api를 정규식으로 인식하는건지 /apis가 필터 되어버린다. 그래서 target으로 요청이 가게됨 그래서 계속 404가 발생하였던 문제 proxy의 "/api"를 "/api/"로 변경 후 정상동작 확인