GitBucket
4.23.0
Toggle navigation
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
sample-kotlin
/
sample-kotlin-spring+mybatis
Browse code
Fix build settings
master
1 parent
485411a
commit
4856fa0b784f0fea5bdf9677fd1e9b9ff4f956f7
yhornisse
authored
on 12 May 2020
Patch
Showing
3 changed files
README.md
build.gradle.kts
settings.gradle.kts
Ignore Space
Show notes
View
README.md
## そのまま実行(UNIX系OSやMacの場合) ``` $ ./gradlew bootRun ``` ## Fat Jar作成(UNIX系OSやMacの場合) ``` $ ./gradlew bootJar ``` ## Fat Jarを実行 ``` $ java -jar build/libs/SampleKotlin-1.0-SNAPSHOT.jar ``` # /tmp/hoge.dbの中身 ``` sqlite> .schema CREATE TABLE book(id, book_name, author_name); sqlite> SELECT * FROM book; 0|hoge|taro 1|fuga|taro sqlite> ```
# /tmp/hoge.dbの中身 ``` sqlite> .schema CREATE TABLE book(id, book_name, author_name); sqlite> SELECT * FROM book; 0|hoge|taro 1|fuga|taro sqlite> ```
Ignore Space
Show notes
View
build.gradle.kts
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar group = "org.example" version = "1.0-SNAPSHOT" plugins { application kotlin("jvm") version "1.3.61" kotlin("plugin.spring") version "1.3.50" id("org.springframework.boot") version "2.2.3.RELEASE" id("io.spring.dependency-management") version "1.0.9.RELEASE" id("com.github.johnrengelman.shadow") version "5.0.0" } application { mainClassName = "com.example.sample.SpringSampleApplicationKt" } repositories { mavenCentral() jcenter() } dependencies { implementation(group = "org.springframework.boot", name = "spring-boot-starter") implementation(group = "org.springframework.boot", name = "spring-boot-starter-web") implementation(group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin") implementation(group = "org.mybatis.spring.boot", name = "mybatis-spring-boot-starter", version = "1.3.0") implementation(group = "org.projectlombok", name = "lombok", version = "1.18.12") implementation(group = "org.xerial", name = "sqlite-jdbc", version = "3.8.11.2") } tasks { withType<ShadowJar> { manifest { attributes( mapOf( "Main-Class" to application.mainClassName ) ) } } }
group = "org.example" version = "1.0-SNAPSHOT" plugins { application kotlin("jvm") version "1.3.61" kotlin("plugin.spring") version "1.3.50" id("org.springframework.boot") version "2.2.5.RELEASE" id("io.spring.dependency-management") version "1.0.9.RELEASE" } application { mainClassName = "com.example.sample.SpringSampleApplicationKt" } repositories { mavenCentral() jcenter() } dependencies { implementation(group = "org.springframework.boot", name = "spring-boot-starter") implementation(group = "org.springframework.boot", name = "spring-boot-starter-web") implementation(group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin") implementation(group = "org.mybatis.spring.boot", name = "mybatis-spring-boot-starter", version = "1.3.0") implementation(group = "org.projectlombok", name = "lombok", version = "1.18.12") implementation(group = "org.xerial", name = "sqlite-jdbc", version = "3.8.11.2") } tasks { withType<Jar> { manifest { attributes( mapOf( "Main-Class" to application.mainClassName ) ) } } }
Ignore Space
Show notes
View
settings.gradle.kts
rootProject.name = "SampleKotlin"
pluginManagement { repositories { gradlePluginPortal() } } rootProject.name = "SampleKotlin"
Show line notes below