Kotlin vs Java

Immutable Configuration properties
Java
@ImmutableConfigurationProperties(prefix = "dependency.updates")
@Validated
@RequiredArgsConstructor // Lombok
@Data // Lombok
public class AppProperties {
    private final List<Location> location;
    private final Git git;
    private final Integer limit;
    @NotBlank
    private final String cron;
    @NotBlank
    private final String priority;
    @NotBlank
    private final String dirPath;
}

@Validated
@Data // Lombok
public class Location {
    @NotBlank
    private final String project;
    @NotBlank
    private final String repository;
}

@Validated
@Data // Lombok
public class Git {
    @NotBlank
    private final String domain;
    private final Credentials credentials;
}

@Validated
@Data // Lombok
public class Credentials {
    @NotBlank
    private final String username;
    @NotBlank
    private final String password;
}
Kotlin
@ImmutableConfigurationProperties(prefix = "dependency.updates")
@Validated
data class AppProperties(
    val locations: List<Location>,
    val git: Git,
    val limit: Int,
    @field:NotBlank
    val cron: String,
    @field:NotBlank
    val priority: String,
    @field:NotBlank
    val dirPath: String
)

@Validated
data class Location(
    @field:NotBlank
    val project: String,
    @field:NotBlank
    val repository: String
)

@Validated
data class Git(
    @field:NotBlank
    val domain: String,
    val credentials: Credentials
)

@Validated
data class Credentials(
    @field:NotBlank
    val username: String,
    @field:NotBlank
    val password: String
)