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

net.wicp.tams.common.spring.property.TamsPropertySource Maven / Gradle / Ivy

There is a newer version: 3.6.1
Show newest version
package net.wicp.tams.common.spring.property;

import org.springframework.cloud.bootstrap.config.PropertySourceLocator;
import org.springframework.core.annotation.Order;
import org.springframework.core.env.CompositePropertySource;
import org.springframework.core.env.Environment;
import org.springframework.core.env.PropertiesPropertySource;
import org.springframework.core.env.PropertySource;

import net.wicp.tams.common.Conf;

@Order(0)
public class TamsPropertySource implements PropertySourceLocator {
	@Override
	public PropertySource locate(Environment environment) {
		CompositePropertySource composite = new CompositePropertySource("tams");
		PropertiesPropertySource mapPropertySource = new PropertiesPropertySource("config", Conf.copyProperties());
		composite.addPropertySource(mapPropertySource);
		return composite;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy