All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aol.micro.server.module.ConfigureEnviroment Maven / Gradle / Ivy

package com.aol.micro.server.module;

import java.util.Collection;
import java.util.Properties;

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

@Configuration
public class ConfigureEnviroment {

	@Autowired(required = false)
	private Collection modules;

	@Bean
	public Environment environment(@Qualifier("propertyFactory") Properties props) {
		if (modules == null) {
			return new Environment(props);
		}
		return new Environment(props, modules);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy