티스토리 뷰
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' 카테고리의 다른 글
[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
- etc
- react
- terraform
- hashicorp
- mysql
- AWS
- pgloader
- Linux
- IntelliJ
- 코딩테스트
- eureka
- Spring Cloud Config
- AWS IoT
- Gradle
- postgresql
- Docker
- spring boot
- Vault
- kotlin
- Puppeteer
- Java
- shell
- JPA
- RancherDesktop
- Git
- JEST
- jQuery
- Node.js
- Database
- javascript
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함