Interface DataSourceBuilder

All Known Subinterfaces:
DataSourceBuilder.Settings
All Known Implementing Classes:
DataSourceConfig

public interface DataSourceBuilder
Builder for DataSourcePool.

Use settings() for getter access to read the configuration set on the builder via DataSourceBuilder.Settings. That is, DataSourceBuilder has the setters only and DataSourceBuilder.Settings has both the getters and setters for the builder.



    DataSourcePool pool = DataSourcePool.builder()
      .name("test")
      .url("jdbc:h2:mem:tests")
      .username("sa")
      .password("")
      .build();

   try (Connection connection = pool.getConnection()) {
     // do something with the connection ...
   }