Polish
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2013 the original author or authors.
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,7 +21,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext
|
||||
/**
|
||||
* Main class to start the embedded server.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Dave Syer
|
||||
*/
|
||||
public final class EmbeddedJarStarter {
|
||||
|
||||
@@ -30,4 +30,5 @@ public final class EmbeddedJarStarter {
|
||||
context.getBean(SpringConfiguration.class).run(args);
|
||||
context.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2013 the original author or authors.
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,19 +27,19 @@ import org.springframework.core.io.support.PropertiesLoaderUtils;
|
||||
/**
|
||||
* Spring configuration.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Dave Syer
|
||||
*/
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
public class SpringConfiguration {
|
||||
|
||||
|
||||
private String message = "Jar";
|
||||
|
||||
|
||||
@PostConstruct
|
||||
public void init() throws IOException {
|
||||
String value = PropertiesLoaderUtils.loadAllProperties("application.properties").getProperty("message");
|
||||
if (value!=null) {
|
||||
this.message = value;
|
||||
this.message = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,6 +48,4 @@ public class SpringConfiguration {
|
||||
System.err.println("Hello Embedded " + this.message + "!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user