SpringBoot /actuator/health: how to set dataSource description?

63
June 18, 2022, at 9:30 PM

I have a dataSource bean which is configured as follows:

    @Bean
    @ConfigurationProperties(prefix = "spring.datasource.somedb")
    public DataSource somedbDataSource() {
        return DataSourceBuilder.create().build();
    }

This produces following entry in my app actuator endpoint:

// part of /actuator/health
...
  somedbDataSource: {
    status: "UP",
    details: {
      database: "Oracle",
      validationQuery: "isValid()"
    }
// I'd like to see some description here, e.g. 
// description: "Retrieve latest very important data of some very important application, read only"
  },
...

As I have many datasources in my app can I add some meaningful description to each of them? How can I do that?

Rent Charter Buses Company
READ ALSO
Unit testing a custom exception in Java

Unit testing a custom exception in Java

Pretty new to Java and trying to practice writing unit testsI have a few similar custom exceptions to the below and wondering what way I can write a test to cover this

68
Retain duplicates in the given list using Stream API

Retain duplicates in the given list using Stream API

I want to find the duplicates in a set of identifier objects

61
Client does not interact with the server java (Socket)-

Client does not interact with the server java (Socket)-

Is a client application that should create an interface and connect to the server which then connects to db to run queriesI can't understand why the client doesn't connect to the server

57
QESeal LTV validation

QESeal LTV validation

I had issues some months ago with signed PDFs and LTVAcrobat Reader showed that the signature is LTV enabled and after some months it started to say otherwise, the signature is not LTV enabled and will expire in around 1 year after the signing

43