package com.buabook.spring.configuration;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.support.AbstractBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.buabook.spring.properties.PropertyLoader;

/**
 * <h3>Spring Property Loader Configurator</h3>
 * <p>This {@link Configuration} allows {@link PropertyLoader} to be autowired into any class to dynamically
 * query properties loaded by Spring.</p>
 * (c) 2017 Sport Trades Ltd
 * 
 * @author Jas Rajasansir
 * @version 1.0.0
 * @since 5 Jan 2017
 */
@Configuration
public class PropertyLoaderConfigurator {

	@Autowired
	private AbstractBeanFactory abstractBeanFactory;


    @Bean
	public PropertyLoader propertyLoader() {
    	return new PropertyLoader(abstractBeanFactory);
    }

}

@@ -32,24 +32,81 @@
 iguration;%0A%0A
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A
 import org.s
@@ -330,32 +330,85 @@
 n.Configuration;
+%0Aimport org.springframework.context.annotation.Scope;
 %0A%0Aimport com.bua
@@ -808,16 +808,112 @@
 urator %7B
+%0A%09private static final Logger log = LoggerFactory.getLogger(PropertyLoaderConfigurator.class);%0A%09
 %0A%0A%09@Auto
@@ -980,16 +980,40 @@
   @Bean%0A
+    @Scope(%22singleton%22)%0A
 %09public 
@@ -1046,16 +1046,135 @@
 der() %7B%0A
+    %09log.debug(%22Initialising new dynamic property loader with bean factory: %22 + abstractBeanFactory.toString());%0A    %09%0A
     %09ret

Add init logging and make singleton