package de.juplo.demo;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.web.reactive.function.client.WebClient;
@SpringBootApplication
-public class DemoApplication {
+public class DemoApplication
+{
+ @Bean
+ public RemoteContentService service(@Value("${remote.host}")String remoteHost)
+ {
+ return new RemoteContentService(WebClient.create(remoteHost));
+ }
- public static void main(String[] args) {
- SpringApplication.run(DemoApplication.class, args);
- }
+ public static void main(String[] args)
+ {
+ SpringApplication.run(DemoApplication.class, args);
+ }
}