Skip to content

Commit 121d475

Browse files
krygerjoshiste
authored andcommitted
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.
1 parent e8c4978 commit 121d475

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/registry/ApplicationRegistry.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ public Application register(Application application) {
5858
Assert.notNull(application, "Application must not be null");
5959
Assert.hasText(application.getName(), "Name must not be null");
6060
Assert.hasText(application.getHealthUrl(), "Health-URL must not be null");
61-
Assert.isTrue(checkUrl(application.getHealthUrl()), "Health-URL is not valid");
61+
Assert.isTrue(checkUrl(application.getHealthUrl()), "Health-URL is not valid: " + application.getHealthUrl());
6262
Assert.isTrue(
6363
StringUtils.isEmpty(application.getManagementUrl())
64-
|| checkUrl(application.getManagementUrl()), "URL is not valid");
64+
|| checkUrl(application.getManagementUrl()), "URL is not valid: " + application.getManagementUrl());
6565
Assert.isTrue(
6666
StringUtils.isEmpty(application.getServiceUrl())
67-
|| checkUrl(application.getServiceUrl()), "URL is not valid");
67+
|| checkUrl(application.getServiceUrl()), "URL is not valid: " + application.getServiceUrl());
6868

6969
String applicationId = generator.generateId(application);
7070
Assert.notNull(applicationId, "ID must not be null");

0 commit comments

Comments
 (0)