diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileCDIExtension.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileCDIExtension.java
index 7a819fc..0e30b78 100644
--- a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileCDIExtension.java
+++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileCDIExtension.java
@@ -19,12 +19,19 @@
 import org.eclipse.microprofile.config.inject.ConfigProperty;
 
 import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.*;
-import java.lang.reflect.Field;
-import java.lang.reflect.Member;
-import java.lang.reflect.Method;
+import javax.enterprise.inject.Instance;
+import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.Extension;
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.enterprise.inject.spi.ProcessBean;
+import javax.enterprise.inject.spi.ProcessProducerMethod;
+import javax.inject.Provider;
+import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
-import java.util.*;
+import java.util.HashSet;
+import java.util.Set;
 import java.util.logging.Logger;
 
 
@@ -61,17 +68,12 @@
         boolean configured = false;
         for (InjectionPoint injectionPoint : ips) {
             if (injectionPoint.getAnnotated().isAnnotationPresent(ConfigProperty.class)) {
-                System.err.println("Configured: " + injectionPoint);
+                LOG.fine("Configuring: " + injectionPoint);
                 final ConfigProperty annotation = injectionPoint.getAnnotated().getAnnotation(ConfigProperty.class);
                 String key = !annotation.name().isEmpty()?annotation.name():MicroprofileConfigurationProducer.getDefaultKey(injectionPoint);
-                Member member = injectionPoint.getMember();
-                if(member instanceof Field) {
-                    types.add(((Field) member).getType());
-                }else if(member instanceof Method){
-                    types.add(((Method) member).getParameterTypes()[0]);
-                }else{
-                    continue;
-                }
+                Type originalType = injectionPoint.getType();
+                Type convertedType = unwrapType(originalType);
+                types.add(convertedType);
                 configured = true;
                 LOG.finest(() -> "Enabling Tamaya Microprofile Configuration on bean: " + configuredType.getName());
                 configuredType.addConfiguredMember(injectionPoint, key);
@@ -95,5 +97,14 @@
         }
     }
 
+    private Type unwrapType(Type type) {
+        if(type instanceof ParameterizedType) {
+            Type rawType = ((ParameterizedType) type).getRawType();
+            if(rawType == Provider.class || rawType == Instance.class) {
+                return ((ParameterizedType) type).getActualTypeArguments()[0];
+            }
+        }
+        return type;
+    }
 
 }
