package quant.rich.emoney.config;

import org.reflections.Reflections;
import org.reflections.scanners.Scanners;
import org.reflections.util.ConfigurationBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Reflections configuration, support autowired
 * 
 * @author Bakwat
 *
 */
@Configuration
public class ReflectionsConfig {

    @Bean("reflections")
    Reflections reflections() {
        return new Reflections(new ConfigurationBuilder()
                .addScanners(
                        Scanners.MethodsAnnotated,
                        Scanners.SubTypes,
                        Scanners.FieldsAnnotated,
                        Scanners.TypesAnnotated)
                .forPackages("quant.rich.emoney"));
    }

}
