init
This commit is contained in:
11
src/main/kotlin/com/test/test/TestApplication.kt
Normal file
11
src/main/kotlin/com/test/test/TestApplication.kt
Normal file
@@ -0,0 +1,11 @@
|
||||
package com.test.test
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
|
||||
@SpringBootApplication
|
||||
class TestApplication
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
runApplication<TestApplication>(*args)
|
||||
}
|
||||
23
src/main/kotlin/com/test/test/rest/TestController.kt
Normal file
23
src/main/kotlin/com/test/test/rest/TestController.kt
Normal file
@@ -0,0 +1,23 @@
|
||||
package com.test.test.rest
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@RestController
|
||||
class TestController {
|
||||
|
||||
@GetMapping("/test")
|
||||
fun test(): String {
|
||||
return "Hello World"
|
||||
}
|
||||
|
||||
@GetMapping("/users")
|
||||
fun users(): ArrayList<String> {
|
||||
return ArrayList()
|
||||
}
|
||||
|
||||
@GetMapping("/")
|
||||
fun home(): String {
|
||||
return "Home page"
|
||||
}
|
||||
}
|
||||
34
src/main/resources/application.yaml
Normal file
34
src/main/resources/application.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
server:
|
||||
port: 8010
|
||||
spring:
|
||||
application:
|
||||
name: app
|
||||
|
||||
# ??????????? ??????????? ? ???? ??????
|
||||
datasource:
|
||||
url: jdbc:postgresql://postgres.my-spring-app-6b948f469d-gdw6q.svc.cluster.local:5432/app_db
|
||||
username: postgres
|
||||
password: postgres
|
||||
driver-class-name: org.postgresql.Driver
|
||||
|
||||
# ????????? JPA
|
||||
jpa:
|
||||
hibernate:
|
||||
# ????????????? ???????/????????? ????? ???? ?????? (????? ?? ???????????? ? ?????)
|
||||
ddl-auto: validate # ????????: none, validate, update, create, create-drop
|
||||
# ???????? ??????????? SQL-???????? (???????????)
|
||||
show-sql: true
|
||||
# ?????????????? SQL ? ?????
|
||||
properties:
|
||||
hibernate:
|
||||
format_sql: true
|
||||
database: postgresql
|
||||
database-platform: org.hibernate.dialect.PostgreSQLDialect
|
||||
|
||||
# ????????? Flyway
|
||||
flyway:
|
||||
enabled: true
|
||||
# ???? ? ????????? (?? ?????????: classpath:db/migration)
|
||||
locations: classpath:db/migration
|
||||
# ????????? ???????? ??? ?????? ??????????
|
||||
baseline-on-migrate: true
|
||||
6
src/main/resources/banner.txt
Normal file
6
src/main/resources/banner.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
,--. ,--. ,--.
|
||||
| | | |,---. | |,---. ,---. ,--,--,--.,---.
|
||||
| |.'.| | .-. :| | .--'| .-. || | .-. :
|
||||
| ,'. \ --.| \ `--.' '-' '| | | \ --.
|
||||
'--' '--'`----'`--'`---' `---' `--`--`--'`----'
|
||||
Reference in New Issue
Block a user