add WebClientConfiguration

This commit is contained in:
2024-12-13 14:18:51 +01:00
parent 2383c59441
commit f230ab80d2

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()
}