Default appName to 'application'.
This commit is contained in:
@@ -170,7 +170,7 @@ public abstract class AbstractDiscoveryLifecycle implements DiscoveryLifecycle,
|
||||
* @return the app name, currently the spring.application.name property
|
||||
*/
|
||||
protected String getAppName() {
|
||||
return this.environment.getProperty("spring.application.name");
|
||||
return this.environment.getProperty("spring.application.name", "application");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,6 +37,7 @@ public class AbstractDiscoveryLifecycleTests {
|
||||
assertEquals("Lifecycle port is wrong", port, lifecycle.getPort().get());
|
||||
assertTrue("Lifecycle not running", lifecycle.isRunning());
|
||||
assertTrue("Lifecycle not registered", lifecycle.isRegistered());
|
||||
assertEquals("Lifecycle appName is wrong", "application", lifecycle.getAppName());
|
||||
}
|
||||
|
||||
@EnableAutoConfiguration
|
||||
|
||||
Reference in New Issue
Block a user