use of org.springframework.core.env.PropertiesPropertySource in project cas by apereo.
the class CasPropertiesConfiguration method init.
/**
* Init.
*/
@PostConstruct
public void init() {
final Properties sysProps = System.getProperties();
final Properties properties = new Properties();
if (CasVersion.getVersion() != null) {
properties.put("info.cas.version", CasVersion.getVersion());
}
properties.put("info.cas.date", CasVersion.getDateTime());
properties.put("info.cas.java.home", sysProps.get("java.home"));
properties.put("info.cas.java.vendor", sysProps.get("java.vendor"));
properties.put("info.cas.java.version", sysProps.get("java.version"));
final PropertiesPropertySource src = new PropertiesPropertySource(CasVersion.class.getName(), properties);
this.environment.getPropertySources().addFirst(src);
}
Aggregations