diff --git a/app/app/pom.xml b/app/app/pom.xml
index 9dd8170..4ad66f3 100644
--- a/app/app/pom.xml
+++ b/app/app/pom.xml
@@ -15,10 +15,18 @@
jar
+
+ com.workshop
+ library-autoconfigure
+
com.workshop
library-api
+
+ com.workshop
+ library-stdout
+
org.springframework.boot
spring-boot-starter
diff --git a/app/app/src/main/java/com/workshop/magic/app/MyGreetingService.java b/app/app/src/main/java/com/workshop/magic/app/MyGreetingService.java
index c7e6824..130c207 100644
--- a/app/app/src/main/java/com/workshop/magic/app/MyGreetingService.java
+++ b/app/app/src/main/java/com/workshop/magic/app/MyGreetingService.java
@@ -2,9 +2,7 @@ package com.workshop.magic.app;
import com.workshop.magic.service.AbstractGreetingService;
-import org.springframework.stereotype.Service;
-
-@Service
+//@Service
class MyGreetingService extends AbstractGreetingService {
@Override
diff --git a/components/library-autoconfigure/pom.xml b/components/library-autoconfigure/pom.xml
index bf945db..9620e04 100644
--- a/components/library-autoconfigure/pom.xml
+++ b/components/library-autoconfigure/pom.xml
@@ -13,4 +13,20 @@
library-autoconfigure
+
+
+ com.workshop
+ library-api
+ true
+
+
+ com.workshop
+ library-stdout
+ true
+
+
+ org.springframework.boot
+ spring-boot-autoconfigure
+
+
diff --git a/components/library-autoconfigure/src/main/java/com/workshop/magic/config/GreetingAutoConfiguration.java b/components/library-autoconfigure/src/main/java/com/workshop/magic/config/GreetingAutoConfiguration.java
new file mode 100644
index 0000000..386df3c
--- /dev/null
+++ b/components/library-autoconfigure/src/main/java/com/workshop/magic/config/GreetingAutoConfiguration.java
@@ -0,0 +1,22 @@
+package com.workshop.magic.config;
+
+import com.workshop.magic.service.GreetingService;
+import com.workshop.magic.service.stdout.StdOutGreetingService;
+
+import org.springframework.boot.autoconfigure.AutoConfiguration;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.context.annotation.Bean;
+
+@AutoConfiguration
+@ConditionalOnClass(GreetingService.class)
+public class GreetingAutoConfiguration {
+
+ @Bean
+ @ConditionalOnMissingBean
+ @ConditionalOnClass(StdOutGreetingService.class)
+ GreetingService stdOutGreetingService() {
+ return new StdOutGreetingService();
+ }
+
+}
diff --git a/components/library-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/components/library-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
new file mode 100644
index 0000000..b43e3a8
--- /dev/null
+++ b/components/library-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -0,0 +1 @@
+com.workshop.magic.config.GreetingAutoConfiguration
\ No newline at end of file