e68c17e792
WebFlux в tgu был фиктивным: блокирующая JPA, контроллеры оборачивали
блокирующие вызовы в Mono.fromCallable{}.subscribeOn(boundedElastic()),
WebClient .block()-ался сразу. Единственный WebFlux-only сервис флота.
- build: подключён pcp-types-lib (тянет starter-web → servlet), springdoc
webflux-ui → webmvc-ui; starter-webflux оставлен только ради WebClient
- контроллеры возвращают значения напрямую (без Mono-обёрток)
- удалено локальное Jackson-2 зеркало PcpTimeModule.kt → модуль из либы
в CamundaJacksonConfig; Jackson-3 зеркало остаётся (Boot 4 держит
Jackson 3 на HTTP-границе и для MVC), WebFluxJacksonConfig → RestJacksonConfig
66 lines
2.4 KiB
Kotlin
66 lines
2.4 KiB
Kotlin
plugins {
|
||
kotlin("jvm")
|
||
kotlin("plugin.spring")
|
||
kotlin("plugin.jpa")
|
||
id("org.springframework.boot")
|
||
id("io.spring.dependency-management")
|
||
}
|
||
|
||
group = "space.nstart.pcp"
|
||
version = "0.0.1"
|
||
|
||
java {
|
||
toolchain {
|
||
languageVersion = JavaLanguageVersion.of(21)
|
||
}
|
||
}
|
||
|
||
dependencies {
|
||
|
||
// Общие типы/слой толерантности времени; тянет spring-boot-starter-web (servlet/MVC),
|
||
// из-за чего приложение запускается как сервлетное (MVC), а не WebFlux.
|
||
implementation(project(":libs:pcp-types-lib"))
|
||
|
||
// Spring Boot
|
||
// starter-webflux оставлен только ради WebClient (внешние HTTP-клиенты, см. integration/api);
|
||
// тип приложения — сервлетный (MVC), т.к. в classpath есть spring-webmvc из starter-web выше.
|
||
implementation("org.springframework.boot:spring-boot-starter-webflux")
|
||
implementation("org.springframework.boot:spring-boot-starter-actuator")
|
||
runtimeOnly("io.micrometer:micrometer-registry-prometheus")
|
||
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:${property("versions.open-api")}")
|
||
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
|
||
implementation("org.springframework.boot:spring-boot-starter-flyway")
|
||
implementation("org.flywaydb:flyway-database-postgresql")
|
||
|
||
implementation("org.springframework.boot:spring-boot-starter")
|
||
implementation("io.camunda:camunda-spring-boot-4-starter:8.8.10")
|
||
implementation("org.springframework.cloud:spring-cloud-starter-config")
|
||
|
||
// Kafka
|
||
implementation("org.springframework.boot:spring-boot-starter-kafka")
|
||
|
||
// Jackson
|
||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
|
||
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
|
||
// Kotlin
|
||
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
||
|
||
// Validation
|
||
implementation("org.springframework.boot:spring-boot-starter-validation")
|
||
runtimeOnly("org.postgresql:postgresql")
|
||
|
||
// Test
|
||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||
testImplementation("org.springframework.kafka:spring-kafka-test")
|
||
}
|
||
|
||
tasks.withType<Test> {
|
||
useJUnitPlatform()
|
||
}
|
||
|
||
dependencyManagement {
|
||
imports {
|
||
mavenBom("org.springframework.cloud:spring-cloud-dependencies:${property("versions.spring.cloud")}")
|
||
}
|
||
}
|