Hello, I am working on a Spring project using Spring Data JPA as a database. I would like to conditionally enable/disable a DataSource on startup.
Specifically, in case the DataSource information is invalid, or a user does not want to use a database, it should be possible to not configure a DataSource. However, if the DataSource is invalid the application simply crashes.
I am creating the DataSource using DataSourceBuilder in a @SpringBootConfiguration class