티스토리 뷰
Dev./Kotlin
[Kotlin] Class should have [public, protected] no-arg constructor 해결법
인쥭 2024. 2. 25. 19:37반응형
Hibernate의 엔티티의 기본 생성자를 활용하는 반면, Kotlin은 별도로 기본 생성자를 만들지 않기 때문이라고 한다.
이러한 불편함은 Kotlin 측에서 누구보다 잘 알것이기에 아래와 같은 플러그인을 제공한다.
plugins {
id("org.springframework.boot") version "3.2.3"
id("io.spring.dependency-management") version "1.1.4"
kotlin("jvm") version "1.9.22"
kotlin("plugin.spring") version "1.9.22"
kotlin("plugin.jpa") version "1.9.22" // 요 친구임!
}
참고
JPA error in kotlin : Class 'Student' should have [public, protected] no-arg constructor
Does anyone know how I can solve this problem: 'Class 'Student' should have [public, protected] no-arg constructor'? It's moaning about the relation to SchoolLesson import javax.persistence.Entity
stackoverflow.com
'Dev. > Kotlin' 카테고리의 다른 글
[Kotlin] 인자에 따라 List를 규칙적으로 뒤섞기 (0) | 2025.03.17 |
---|---|
[mockk] private extension function 모킹하기 (0) | 2024.10.28 |
[Kotlin] Scope Functions (0) | 2023.10.23 |
[SpringBoot] WebTestClient NoSuchBeanDefinitionException 예외 해결법 (0) | 2023.04.19 |
[Kotlin] java.security.InvalidKeyException: IOException : algid parse error 원인 (0) | 2023.03.21 |
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- jQuery
- Linux
- Database
- Vault
- Java
- Git
- javascript
- mysql
- Gradle
- eureka
- kotlin
- Spring Cloud Config
- JEST
- spring boot
- AWS IoT
- terraform
- JPA
- react
- Docker
- Node.js
- AWS
- hashicorp
- Puppeteer
- shell
- RancherDesktop
- 코딩테스트
- IntelliJ
- pgloader
- postgresql
- etc
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
글 보관함