Why is the dataSource not initialized when the service starts?
Question
I used Springboot2.7.18 and version 5.5.0 of shardingsphere-jdbc5.5.0 with relevant configurations, but the data source of the database is not initialized when the service starts. It is only initialized when the database is accessed for the first time, which can cause slow service execution. Is this determined by the configuration or is it designed to be like this?
In springboot, Hikari connection pool is used by default. When your application does not try to getConnection from Hikari, Hikari is not initialized, and the ShardingSphereDataSource object is not created. Therefore, ShardingSphere cannot pre-acquire the connection from the DB.
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.