Skip to content

Commit 682ba92

Browse files
committed
feat: Kotlin 의존성 추가
1 parent 1c5c5c4 commit 682ba92

File tree

3 files changed

+48
-57
lines changed

3 files changed

+48
-57
lines changed

build.gradle

+25-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
plugins {
2-
id 'java'
32
id 'org.springframework.boot' version '3.2.3'
43
id 'io.spring.dependency-management' version '1.1.4'
4+
id 'org.jetbrains.kotlin.jvm' version '1.8.21'
5+
id 'org.jetbrains.kotlin.plugin.spring' version '1.8.21'
6+
id 'org.jetbrains.kotlin.kapt' version '1.8.21'
7+
id 'org.jetbrains.kotlin.plugin.allopen' version '1.9.23'
58
}
69

710
group = 'com.wooteco'
811
version = '0.0.1-SNAPSHOT'
912

1013
java {
11-
sourceCompatibility = '17'
12-
}
13-
14-
configurations {
15-
compileOnly {
16-
extendsFrom annotationProcessor
17-
}
14+
sourceCompatibility = JavaVersion.VERSION_17
1815
}
1916

2017
repositories {
@@ -24,12 +21,30 @@ repositories {
2421
dependencies {
2522
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
2623
implementation 'org.springframework.boot:spring-boot-starter-web'
27-
// JWT 라이브러리. https://github.com/jwtk/jjwt
2824
implementation 'io.jsonwebtoken:jjwt:0.12.5'
25+
2926
compileOnly 'org.projectlombok:lombok'
30-
runtimeOnly 'com.mysql:mysql-connector-j'
3127
annotationProcessor 'org.projectlombok:lombok'
28+
29+
runtimeOnly 'com.mysql:mysql-connector-j'
30+
runtimeOnly "com.h2database:h2"
3231
testImplementation 'org.springframework.boot:spring-boot-starter-test'
32+
testImplementation 'io.kotest:kotest-runner-junit5:5.8.1'
33+
testImplementation 'io.kotest.extensions:kotest-extensions-spring:1.3.0'
34+
35+
implementation "org.jetbrains.kotlin:kotlin-reflect"
36+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
37+
}
38+
39+
kapt {
40+
keepJavacAnnotationProcessors = true
41+
}
42+
43+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
44+
kotlinOptions {
45+
freeCompilerArgs = ['-Xjsr305=strict']
46+
jvmTarget = '17'
47+
}
3348
}
3449

3550
tasks.named('test') {

src/main/resources/application.yml

+23-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
1+
server:
2+
port: 8080
3+
14
spring:
2-
application:
3-
name: wiki
4-
profiles:
5-
group:
6-
local: local, common
7-
product: product, common
5+
main:
6+
allow-bean-definition-overriding: true
7+
8+
datasource:
9+
url: jdbc:h2:mem:database;MODE=MySQL;
10+
11+
h2:
12+
console:
13+
enabled: true
14+
15+
jpa:
16+
database-platform: org.hibernate.dialect.H2Dialect
17+
hibernate:
18+
ddl-auto: create-drop
19+
naming:
20+
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
21+
show-sql: true
22+
23+
jwt:
24+
key: 012345678901234567890123456789012345678901234567890123456789

src/main/resources/logback-spring.xml

-41
This file was deleted.

0 commit comments

Comments
 (0)