전체 글 881

ktlint lint 적용

ktlint 정상혁님이 써주신, kotlin lint를 위한 가이드 문서가 잘 소개되어 있습니다. https://blog.benelog.net/ktlint 해당 방식에서는 크게 보면 총 2가지의 방식을 설명하고 있습니다. gradle 빌드 설정 IntelliJ 설정 위와 같은 방식 중에서 review repo, point repo에 도입한 방식은 첫번째 방식인 gradle build 설정을 통한 kotlin lint를 도입하였습니다. https://kotlinlang.org/docs/coding-conventions.html kotlin 언어의 coding convention은 kotlin official로 정의를 하고 있는 특정한 규약들이 있습니다. (java의 경우, Google style guide..

SQL Join

매번, Join 데이터 구성이 어떻게 되더라.. 기억이 가물 가물 한데, 스택오버플로우에 좋은 그림이 있어서 가져왔다. 사실 left join, inner join 제외 하고 잘 안써본듯.. https://stackoverflow.com/questions/3308122/how-do-i-decide-when-to-use-right-joins-left-joins-or-inner-joins-or-how-to-dete How do I decide when to use right joins/left joins or inner joins Or how to determine which table is on which side? I know the usage of joins, but sometimes I come ac..

DB 2024.02.06

JPQL

JPQL Type Expression 문자 'Hello' 숫자 10L(Long) 10D(Double) 10F(Float) Boolean ENUM package path 포함 Entity TYPE(m) = 상속관계 select i from Item i where type(i) = Book 조건식 - CASE 식 기본 CASE 식 select case when m.age = 60 then '경로요금' else '일반요금' end from Member m 단순 CASE 식 select case t.name when '팀A' then '인센티브 110%' when '팀B' then '인센티브 120%' else ..

프로그래밍/JPA 2024.01.10

값 타입

기본값 타입 JPA의 데이터 타입 분류 엔티티 타입 @Entity로 정의 하는 객체 데이터가 변해도 식별자로 지속해서 추적 가능 값 타입 int, Integer, String처럼 단순한 값으로 사용하는 기본 타입이나 객체 식별자가 없고 값만 있어서 변경시 추적 불가 값 타입 분류 기본값 타입 primitive type wrapper class type String embedded type (복합 값타입) collection value type 기본 값 타입 생명주기를 엔티티의 의존 값 타입은 공유하면 안됨 임베디드 타입 새로운 값 타입을 직접 정의할 수 있음 JPA는 임베디드 타입이라고 함 주로 기본 값 타입을 모아서 만들어서 복합 값타입이라고 함 int, String과 같은 값 타입 @Embeddabl..

프로그래밍/JPA 2024.01.10

kotest 관련 @Transactional rollback 안되는 이슈

test 코드의 상위 패키지 레벨에 아래 설정을 넣어준다. object KotestConfig : AbstractProjectConfig() { // rollback 관련 동작 안해서 아래 설정 추가 override fun extensions() = listOf(SpringTestExtension(SpringTestLifecycleMode.Root)) } https://kotest.io/docs/framework/project-config.html Project Level Config | Kotest Kotest is flexible and has many ways to configure tests, such as configuring the order of tests inside a spec, or h..

Kapt 관련 오류시 참조 (superclass access check failed)

superclass access check failed: class org.jetbrains.kotlin.kapt3.base.javac.KaptJavaCompiler (in unnamed module @0x37be58b7) cannot access class cohttp://m.sun.tools.javac.main.JavaCompiler (in module jdk.compiler) because module jdk.compiler does not export cohttp://m.sun.tools.javac.main to unnamed module @0x37be58b7 위와 같은 오류가 발생하길래 뭔가 했더니, Java9 이후부터 모듈 시스템이 등장 했는데, 이때문에 이런 오류가 발생하는 것 같다. JDK..

Jetbrains tool이 실행 안될때, Cannot connect to already running IDE instance

https://stackoverflow.com/questions/77003028/error-while-opening-intellij-idea-due-to-an-already-running-process Error while opening Intellij IDEA due to an already running process I am trying to open the Intellij IDEA on Mac, but it is showing the following error: Cannot connect to already running IDE instance. Exception: Process 464 is still I was able to open Intellij stackoverflow.com find ~..

Tool 2023.10.26

Goodbye, Yoda condition? (요다표현식)

https://seungdols.tistory.com/246 Yoda Condition 이란 방어코딩의 종류에 대해 알아보자!! 우리가 보통 C언어에서 if( 변수 == 상수 ) 이런 방식으로 많이 써왔는데 C 언어를 만든 개발자는 굉장히 똑똑한 사람이기에 자질구레한 실수를 하지 않는 사람이었나보다. if( val = literal) 이런 식 seungdols.tistory.com 2014년도쯤 C언어를 쓸 무렵에 Yoda condition을 접했고, 잘 썼던 기억이 있다. 오랜만에 다시 찾아보니, WordPress에서도 Fade out 된 것인가? 버그를 찾는데에는 능하지만, 코드를 읽기 어렵게 만든다는 것이 주된 내용이다. https://developer.woocommerce.com/2022/08/1..

승돌 쓰다 2023.10.10

confluent-kafka clients 다운로드가 안 될때

보통 kafka clients가 dependency가 아래 두 종류를 사용 할 것이다. // https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients implementation("org.apache.kafka:kafka-clients:7.2.0-ccs") // https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients implementation("org.apache.kafka:kafka-clients:3.5.1") 그런데, 자꾸 ccs 버전을 쓰게 되면, 다운로드가 안되는 경우가 있다. 그럴때는 build.gradle.kts 파일의 repositories 블록을 확인 해보자. repos..

반응형