This commit is contained in:
dmitriy.churmeev
2026-03-03 20:37:47 +03:00
parent f4ec39d1a4
commit cab24a6a1d
18 changed files with 619 additions and 0 deletions

View 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)
}

View 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"
}
}

View 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

View File

@@ -0,0 +1,6 @@
,--. ,--. ,--.
| | | |,---. | |,---. ,---. ,--,--,--.,---.
| |.'.| | .-. :| | .--'| .-. || | .-. :
| ,'. \ --.| \ `--.' '-' '| | | \ --.
'--' '--'`----'`--'`---' `---' `--`--`--'`----'