add WebClientConfiguration
This commit is contained in:
@@ -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()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user