Implemented an example for a controller, that fetches remote-data
[demos/testing] / src / main / java / de / juplo / demo / DemoApplication.java
index 76f6fe4..53303c5 100644 (file)
@@ -1,12 +1,22 @@
 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;
 
 @SpringBootApplication
 public class DemoApplication {
 
-       public static void main(String[] args) {
+  @Bean
+  public RemoteContentController remoteContentController(
+      @Value("${remote.host}")String remoteHost)
+  {
+    return new RemoteContentController(remoteHost);
+  }
+
+
+  public static void main(String[] args) {
                SpringApplication.run(DemoApplication.class, args);
        }