public String getValidationQuery ( ) { final String validationQuery = basicJdbcConfiguration . getConfiguredValidationQuery ( ) ; if ( calculatedValidationQuery == null || StringUtils . hasText ( validationQuery ) ) { calculatedValidationQuery = validationQuery ; if ( ! StringUtils . hasText ( calculatedValidationQuery ) ) { JdbcDatabaseManager . findDatabase ( getUrl ( ) ) . ifPresent ( db -> calculatedValidationQuery = db . getValidationQuery ( ) ) ; } } return calculatedValidationQuery ; }
Determines the validation query based on the configured value . If the validation query is not configured search pre - defined databases for a match based on the URL . If a match is found return the defined validation query for that database .