You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/03/30 07:10:15 UTC

[GitHub] [incubator-shardingsphere] wujiangyong commented on issue #3681: tomcat start slowly with default datasource setting

wujiangyong commented on issue #3681:  tomcat start slowly with default datasource setting
URL: https://github.com/apache/incubator-shardingsphere/issues/3681#issuecomment-605823201
 
 
   I've been using `4.0.1` and I have the same problem, it took me 5-7 minutes to start up the app.
   
   Then I google it, one way is to skip the method, which I haven't adopted. Copy the class `TableMetaDataInitializer` into your project, and remove `loadDefaultTables` method.
   
   Then I looked into the code, I found when `findActualDefaultDataSourceName` returns `Optional.absent()`, it will not run into the actual loading. So I assume in some cases, `loadDefaultTables()` is not required, and I'v only used table sharding with sharding-jdbc, so there comes the second solution,  I configured two `<sharding:master-slave-rule>` in `<sharding:master-slave-rules>`, and actually the second one is a placeholder which I never used, and everything works fine for me, so far so good.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services