Avoid accessing static variables or static methods of this class through object references of a class. It increases the cost of compiler parsing and can be accessed directly by class name.
This commit is contained in:
parent
bce13d20ac
commit
ebeacb0e31
@ -47,7 +47,7 @@ public class DynamicDataSource implements ApplicationContextAware {
|
||||
public DataSourceService getDataSource() {
|
||||
DataSourceService dataSourceService = null;
|
||||
|
||||
if (STANDALONE_MODE && !propertyUtil.isStandaloneUseMysql()) {
|
||||
if (STANDALONE_MODE && !PropertyUtil.isStandaloneUseMysql()) {
|
||||
dataSourceService = (DataSourceService)applicationContext.getBean("localDataSourceService");
|
||||
} else {
|
||||
dataSourceService = (DataSourceService)applicationContext.getBean("basicDataSourceService");
|
||||
|
@ -90,7 +90,7 @@ public class LocalDataSourceServiceImpl implements DataSourceService {
|
||||
tm.setDataSource(ds);
|
||||
tjt.setTimeout(5000);
|
||||
|
||||
if (STANDALONE_MODE && !propertyUtil.isStandaloneUseMysql()) {
|
||||
if (STANDALONE_MODE && !PropertyUtil.isStandaloneUseMysql()) {
|
||||
reload();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user