Add basic module
This commit is contained in:
parent
723e5a4178
commit
f8dd12bee0
|
|
@ -0,0 +1,21 @@
|
|||
plugins {
|
||||
id("kotlin")
|
||||
id("kotlin-spring")
|
||||
id("maven-publish")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
||||
|
||||
implementation("org.springframework.boot:spring-boot-starter-webflux")
|
||||
|
||||
implementation(project(":logger-spring"))
|
||||
implementation(project(":common-spring-web"))
|
||||
implementation(project(":push-message-provider"))
|
||||
|
||||
testImplementation(project(":logger-spring-web"))
|
||||
|
||||
testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
testImplementation("org.testcontainers:junit-jupiter")
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package ru.touchin.push.message.provider.hpk
|
||||
|
||||
import org.springframework.context.annotation.Import
|
||||
import ru.touchin.push.message.provider.hpk.configurations.PushMessageProviderHpkConfiguration
|
||||
|
||||
@Import(value = [PushMessageProviderHpkConfiguration::class])
|
||||
annotation class EnablePushMessageProviderHpk
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package ru.touchin.push.message.provider.hpk.properties
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties
|
||||
import org.springframework.boot.context.properties.ConstructorBinding
|
||||
import java.net.URL
|
||||
import java.time.Duration
|
||||
|
||||
@ConstructorBinding
|
||||
@ConfigurationProperties(prefix = "push-message-provider.hpk")
|
||||
data class HpkProperties(
|
||||
val webServices: WebServices,
|
||||
) {
|
||||
|
||||
class WebServices(
|
||||
val clientId: String,
|
||||
val oauth: Oauth,
|
||||
val hpk: Hpk,
|
||||
)
|
||||
|
||||
class Oauth(
|
||||
val clientSecret: String,
|
||||
url: URL,
|
||||
http: Http,
|
||||
ssl: Ssl?,
|
||||
) : WebService(
|
||||
url = url,
|
||||
http = http,
|
||||
ssl = ssl,
|
||||
)
|
||||
|
||||
class Hpk(
|
||||
url: URL,
|
||||
http: Http,
|
||||
ssl: Ssl?,
|
||||
) : WebService(
|
||||
url = url,
|
||||
http = http,
|
||||
ssl = ssl,
|
||||
)
|
||||
|
||||
open class WebService(
|
||||
val url: URL,
|
||||
val http: Http,
|
||||
val ssl: Ssl?,
|
||||
)
|
||||
|
||||
class Http(
|
||||
val readTimeout: Duration,
|
||||
val writeTimeout: Duration,
|
||||
val connectionTimeout: Duration,
|
||||
)
|
||||
|
||||
class Ssl(
|
||||
val handshakeTimeout: Duration,
|
||||
val notifyFlushTimeout: Duration,
|
||||
val notifyReadTimeout: Duration,
|
||||
)
|
||||
|
||||
}
|
||||
|
|
@ -45,6 +45,7 @@ include("validation-spring")
|
|||
include("version-spring-web")
|
||||
include("push-message-provider")
|
||||
include("push-message-provider-fcm")
|
||||
include("push-message-provider-hpk")
|
||||
include("response-wrapper-spring-web")
|
||||
include("settings-spring-jpa")
|
||||
include("security-authorization-server-core")
|
||||
|
|
|
|||
Loading…
Reference in New Issue