|
|
@ -21,6 +21,7 @@ import org.apache.commons.logging.LogFactory;
|
|
|
|
import org.springframework.boot.bind.RelaxedPropertyResolver;
|
|
|
|
import org.springframework.boot.bind.RelaxedPropertyResolver;
|
|
|
|
import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent;
|
|
|
|
import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent;
|
|
|
|
import org.springframework.context.ApplicationListener;
|
|
|
|
import org.springframework.context.ApplicationListener;
|
|
|
|
|
|
|
|
import org.springframework.core.Ordered;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An {@link ApplicationListener}that halts application startup if the system file
|
|
|
|
* An {@link ApplicationListener}that halts application startup if the system file
|
|
|
@ -42,10 +43,15 @@ import org.springframework.context.ApplicationListener;
|
|
|
|
* @author Dave Syer
|
|
|
|
* @author Dave Syer
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public class FileEncodingApplicationListener implements
|
|
|
|
public class FileEncodingApplicationListener implements
|
|
|
|
ApplicationListener<ApplicationEnvironmentPreparedEvent> {
|
|
|
|
ApplicationListener<ApplicationEnvironmentPreparedEvent>, Ordered {
|
|
|
|
|
|
|
|
|
|
|
|
private static Log logger = LogFactory.getLog(FileEncodingApplicationListener.class);
|
|
|
|
private static Log logger = LogFactory.getLog(FileEncodingApplicationListener.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public int getOrder() {
|
|
|
|
|
|
|
|
return Ordered.LOWEST_PRECEDENCE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {
|
|
|
|
public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {
|
|
|
|
RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
|
|
|
|
RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
|
|
|
|