Commit 121d4755 by Lukasz Kryger Committed by Johannes Edmeier

Include the invalid URL value in the message

This helps to quickly track down configuration problems, especially in systems that generate the config rather than depend on flat files.
parent e8c49782
......@@ -58,13 +58,13 @@ public class ApplicationRegistry implements ApplicationEventPublisherAware {
Assert.notNull(application, "Application must not be null");
Assert.hasText(application.getName(), "Name must not be null");
Assert.hasText(application.getHealthUrl(), "Health-URL must not be null");
Assert.isTrue(checkUrl(application.getHealthUrl()), "Health-URL is not valid");
Assert.isTrue(checkUrl(application.getHealthUrl()), "Health-URL is not valid: " + application.getHealthUrl());
Assert.isTrue(
StringUtils.isEmpty(application.getManagementUrl())
|| checkUrl(application.getManagementUrl()), "URL is not valid");
|| checkUrl(application.getManagementUrl()), "URL is not valid: " + application.getManagementUrl());
Assert.isTrue(
StringUtils.isEmpty(application.getServiceUrl())
|| checkUrl(application.getServiceUrl()), "URL is not valid");
|| checkUrl(application.getServiceUrl()), "URL is not valid: " + application.getServiceUrl());
String applicationId = generator.generateId(application);
Assert.notNull(applicationId, "ID must not be null");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment