refactor: use spring's webclient.builder

This commit is contained in:
Gauthier Roebroeck 2024-12-18 16:38:28 +08:00
parent feb807b0ec
commit 9fde145860

View file

@ -25,8 +25,9 @@ private const val WEBSITE = "https://komga.org"
@RequestMapping("api/v1/announcements", produces = [MediaType.APPLICATION_JSON_VALUE])
class AnnouncementController(
private val userRepository: KomgaUserRepository,
webClientBuilder: WebClient.Builder,
) {
private val webClient = WebClient.create("$WEBSITE/blog/feed.json")
private val webClient = webClientBuilder.baseUrl("$WEBSITE/blog/feed.json").build()
private val cache =
Caffeine