프로그래밍 299

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..

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..

Grpc framework, protobuf 관리, grpc 기본 톺아보기

grpc 구조 https://grpc.io/docs/what-is-grpc/introduction/ gRPC에서는 클라이언트 애플리케이션이 로컬 객체처럼 다른 컴퓨터의 서버 애플리케이션에 있는 메서드를 직접 호출할 수 있으므로 분산 애플리케이션과 서비스를 더 쉽게 만들 수 있습니다. 많은 RPC 시스템에서와 마찬가지로 gRPC는 서비스를 정의하고 매개변수와 반환 유형으로 원격으로 호출할 수 있는 메서드를 지정하는 개념을 기반으로 합니다. 서버 측에서는 서버가 이 인터페이스를 구현하고 클라이언트 호출을 처리하기 위해 gRPC 서버를 실행합니다. 클라이언트 측에서는 클라이언트가 서버와 동일한 메서드를 제공하는 스텁(일부 언어에서는 그냥 클라이언트라고 함)을 가지고 있습니다. gRPC 클라이언트와 서버는 Go..

grpc ui client (kreya, postman)

https://kreya.app/ The ultimate gRPC and REST client | Kreya The cross-platform gRPC and REST GUI testing tool. kreya.app grpc 통신을 해보려면, client가 필요한데, 편리하게 되어 있다. (기존에는 bloomrpc가 대세였다) 이제는 postman에서도 grpc request를 보낼 수 있다. https://blog.postman.com/postman-now-supports-grpc/ Postman Now Supports gRPC | Postman Blog We are excited to announce first-class support for gRPC in Postman. Learn how to g..

반응형