|
|
@ -33,7 +33,8 @@ public class DbJob {
|
|
|
|
String user = environment.getProperty("spring.datasource.druid.username");
|
|
|
|
String user = environment.getProperty("spring.datasource.druid.username");
|
|
|
|
String password = environment.getProperty("spring.datasource.druid.password");
|
|
|
|
String password = environment.getProperty("spring.datasource.druid.password");
|
|
|
|
String url = environment.getProperty("spring.datasource.druid.url");
|
|
|
|
String url = environment.getProperty("spring.datasource.druid.url");
|
|
|
|
int index1 = url.indexOf("3306/");
|
|
|
|
// int index1 = url.indexOf("3306/");
|
|
|
|
|
|
|
|
int index1 = url.indexOf("19506/");
|
|
|
|
int index2 = url.indexOf("?");
|
|
|
|
int index2 = url.indexOf("?");
|
|
|
|
String db = url.substring(index1+5, index2);
|
|
|
|
String db = url.substring(index1+5, index2);
|
|
|
|
|
|
|
|
|
|
|
|