@Service(value="basicDataSourceService") public class BasicDataSourceServiceImpl extends Object implements DataSourceService
| Constructor and Description |
|---|
BasicDataSourceServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkMasterWritable()
check master db
|
String |
getCurrentDBUrl()
get current db url
|
String |
getHealth()
get heath
|
org.springframework.jdbc.core.JdbcTemplate |
getJdbcTemplate()
get jdbc template
|
org.springframework.transaction.support.TransactionTemplate |
getTransactionTemplate()
get transaction template
|
void |
init() |
void |
reload()
reload
|
@PostConstruct public void init()
public void reload()
throws IOException
DataSourceServicereload in interface DataSourceServiceIOException - exceptionpublic boolean checkMasterWritable()
DataSourceServicecheckMasterWritable in interface DataSourceServicepublic org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
DataSourceServicegetJdbcTemplate in interface DataSourceServicepublic org.springframework.transaction.support.TransactionTemplate getTransactionTemplate()
DataSourceServicegetTransactionTemplate in interface DataSourceServicepublic String getCurrentDBUrl()
DataSourceServicegetCurrentDBUrl in interface DataSourceServicepublic String getHealth()
DataSourceServicegetHealth in interface DataSourceServiceCopyright © 2018–2019 Alibaba Group. All rights reserved.