|
|
@@ -1,9 +1,6 @@
|
|
|
package com.usoftchina.uas.office.service;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
-import com.usoftchina.uas.office.context.MasterHolder;
|
|
|
-import com.usoftchina.uas.office.jdbc.DataSourceHolder;
|
|
|
-import com.usoftchina.uas.office.jdbc.DynamicDataSource;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -53,11 +50,6 @@ public abstract class AbstractService {
|
|
|
|
|
|
protected <T> T queryForBean(String statement, Class<T> targetCls, Object... arguments) {
|
|
|
try {
|
|
|
- try {
|
|
|
- logger.debug(((DynamicDataSource)jdbcTemplate.getDataSource()).lookupSchema());
|
|
|
- logger.debug(String.valueOf(DataSourceHolder.get()));
|
|
|
- } catch (Exception e) {
|
|
|
- }
|
|
|
return jdbcTemplate.queryForObject(statement, new BeanPropertyRowMapper<>(targetCls), arguments);
|
|
|
} catch (EmptyResultDataAccessException e) {
|
|
|
return null;
|