瀏覽代碼

去除继承datasource,使用getNative获取数据源

zhouhao 7 年之前
父節點
當前提交
94f6def285

+ 1 - 1
hsweb-datasource/hsweb-datasource-api/src/main/java/org/hswebframework/web/datasource/DynamicDataSource.java

@@ -10,7 +10,7 @@ import javax.sql.DataSource;
  * @author zhouhao
  * @author zhouhao
  * @since 3.0
  * @since 3.0
  */
  */
-public interface DynamicDataSource extends DataSource {
+public interface DynamicDataSource {
 
 
     /**
     /**
      * @return 数据源ID
      * @return 数据源ID

+ 0 - 45
hsweb-datasource/hsweb-datasource-api/src/main/java/org/hswebframework/web/datasource/DynamicDataSourceProxy.java

@@ -60,49 +60,4 @@ public class DynamicDataSourceProxy implements DynamicDataSource {
 
 
         return databaseType;
         return databaseType;
     }
     }
-
-    @Override
-    public Connection getConnection() throws SQLException {
-        return proxy.getConnection();
-    }
-
-    @Override
-    public Connection getConnection(String username, String password) throws SQLException {
-        return proxy.getConnection(username, password);
-    }
-
-    @Override
-    public <T> T unwrap(Class<T> iface) throws SQLException {
-        return proxy.unwrap(iface);
-    }
-
-    @Override
-    public boolean isWrapperFor(Class<?> iface) throws SQLException {
-        return proxy.isWrapperFor(iface);
-    }
-
-    @Override
-    public PrintWriter getLogWriter() throws SQLException {
-        return proxy.getLogWriter();
-    }
-
-    @Override
-    public void setLogWriter(PrintWriter out) throws SQLException {
-        proxy.setLogWriter(out);
-    }
-
-    @Override
-    public void setLoginTimeout(int seconds) throws SQLException {
-        proxy.setLoginTimeout(seconds);
-    }
-
-    @Override
-    public int getLoginTimeout() throws SQLException {
-        return proxy.getLoginTimeout();
-    }
-
-    @Override
-    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
-        return proxy.getParentLogger();
-    }
 }
 }