add WebClientConfiguration

This commit is contained in:
2025-01-15 12:53:01 +01:00
parent 3bd6f3b5af
commit d97502bcf8

View File

@@ -0,0 +1,16 @@
package ltd.hlaeja.configuration
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpHeaders.CONTENT_TYPE
import org.springframework.http.MediaType.APPLICATION_JSON_VALUE
import org.springframework.web.reactive.function.client.WebClient
@Configuration
class WebClientConfiguration {
@Bean
fun webClient(): WebClient = WebClient.builder()
.defaultHeader(CONTENT_TYPE, APPLICATION_JSON_VALUE)
.build()
}