
Properties under `server.ssl.server-name-bundles` and `management.server.ssl.server-name-bundles` can be used to configure mappings of host names to SSL bundles to support SNI in embedded web servers. Closes gh-26022
55 lines
1.5 KiB
Groovy
55 lines
1.5 KiB
Groovy
import org.springframework.boot.gradle.tasks.bundling.BootJar
|
|
|
|
plugins {
|
|
id "java"
|
|
id "org.springframework.boot" version "3.3.0-SNAPSHOT"
|
|
}
|
|
|
|
apply plugin: "io.spring.dependency-management"
|
|
|
|
repositories {
|
|
maven { url "file:${rootDir}/../int-test-maven-repository"}
|
|
mavenCentral()
|
|
maven { url "https://repo.spring.io/snapshot" }
|
|
maven { url "https://repo.spring.io/milestone" }
|
|
}
|
|
|
|
configurations {
|
|
app {
|
|
extendsFrom(configurations.runtimeClasspath)
|
|
}
|
|
netty {
|
|
extendsFrom(app)
|
|
}
|
|
tomcat {
|
|
extendsFrom(app)
|
|
}
|
|
undertow {
|
|
extendsFrom(app)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly("org.springframework:spring-webflux")
|
|
|
|
implementation("org.springframework.boot:spring-boot-starter")
|
|
implementation("org.springframework.boot:spring-boot-starter-actuator")
|
|
|
|
app(files(sourceSets.main.output))
|
|
app("org.springframework:spring-webflux") {
|
|
exclude group: "spring-boot-project", module: "spring-boot-starter-reactor-netty"
|
|
}
|
|
netty("org.springframework.boot:spring-boot-starter-webflux")
|
|
tomcat("org.springframework.boot:spring-boot-starter-tomcat")
|
|
undertow("org.springframework.boot:spring-boot-starter-undertow")
|
|
}
|
|
|
|
["netty", "tomcat", "undertow"].each { webServer ->
|
|
def configurer = { task ->
|
|
task.mainClass = "org.springframework.boot.sni.server.SniServerApplication"
|
|
task.classpath = configurations.getByName(webServer)
|
|
task.archiveClassifier = webServer
|
|
task.targetJavaVersion = project.getTargetCompatibility()
|
|
}
|
|
tasks.register("${webServer}ServerApp", BootJar, configurer)
|
|
} |