Skip to content

Instantly share code, notes, and snippets.

@dittos
Last active November 2, 2017 12:17
Show Gist options
  • Save dittos/9e94540705d39f60521f437415f20eeb to your computer and use it in GitHub Desktop.
Save dittos/9e94540705d39f60521f437415f20eeb to your computer and use it in GitHub Desktop.
Kotlin data class + JPA
package org.sapzil
import org.springframework.boot.autoconfigure.SpringBootApplication
@SpringBootApplication
open class Application
group 'org.sapzil'
version '1.0-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.1.51'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.springframework.boot:spring-boot-gradle-plugin:1.5.7.RELEASE"
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'org.springframework.boot'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
compile "org.springframework.boot:spring-boot-starter-data-jpa"
compile "com.h2database:h2"
testCompile "org.springframework.boot:spring-boot-starter-test"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
@Chris0123
Copy link

How's terrible!!!!!It let me full of throw.><

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment