com.bluetrainsoftware.common.config.ConfigurationRefresher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stickycode-extended-config Show documentation
Show all versions of stickycode-extended-config Show documentation
Extends the functionality of Spring Boot and Sticky Code and provides extra support for Kubernetes style mounted volumes.
package com.bluetrainsoftware.common.config;
import javax.inject.Inject;
import net.stickycode.configured.ConfigurationSystem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
public class ConfigurationRefresher
implements ApplicationListener {
private Logger log = LoggerFactory.getLogger(getClass());
@Inject
public ConfigurationSystem system;
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
log.info("Configure system on event {}", event);
system.start();
}
}