Skip to content

Commit fe603fc

Browse files
committed
Fix issue with baseUrls
1 parent 57a32ad commit fe603fc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

kotlin-wot-spring-boot-starter/src/main/kotlin/spring/HttpProperties.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
package org.eclipse.thingweb.spring
88

99
import org.springframework.boot.context.properties.ConfigurationProperties
10-
import org.springframework.boot.context.properties.bind.ConstructorBinding
1110
import org.springframework.validation.annotation.Validated
1211

1312
open class ServerProperties(
@@ -23,13 +22,15 @@ open class ServerProperties(
2322
class HttpServerProperties(
2423
enabled: Boolean = true,
2524
host: String = "0.0.0.0",
26-
port: Int = 8080
27-
) : ServerProperties(enabled, host, port, listOf("http://localhost:$port"))
25+
port: Int = 8080,
26+
baseUrls: List<String> = listOf("http://localhost:$port")
27+
) : ServerProperties(enabled, host, port, baseUrls)
2828

2929
@ConfigurationProperties(prefix = "wot.servient.websocket.server", ignoreUnknownFields = true)
3030
@Validated
3131
class WebsocketProperties(
3232
enabled: Boolean = true,
3333
host: String = "0.0.0.0",
34-
port: Int = 8080
35-
) : ServerProperties(enabled, host, port, listOf("ws://localhost:$port"))
34+
port: Int = 8080,
35+
baseUrls: List<String> = listOf("ws://localhost:$port")
36+
) : ServerProperties(enabled, host, port, baseUrls)

0 commit comments

Comments
 (0)