- 浏览: 1768120 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (723)
- IE 国际化 (1)
- java (310)
- python (52)
- Spring (101)
- eclipse (43)
- birt (10)
- exe4j (1)
- ActiveMQ (3)
- HornetQ (7)
- Ext (16)
- Linux (50)
- james (1)
- mail (3)
- 经验 (288)
- tomcat (5)
- Netty (3)
- ant (6)
- rsync (2)
- MD5 (3)
- 正则表达式 (3)
- 非技术 (59)
- mysql (28)
- sftp (1)
- Commons (2)
- oracle (3)
- vsftp (1)
- jdoc (1)
- socket (3)
- SEDA (2)
- UUID (1)
- quartz (7)
- javascript (50)
- sql (5)
- array (3)
- POI (3)
- redis (2)
- junit (4)
- 二维码 (1)
- jdk (8)
- h2 (6)
- maven (37)
- JVM (5)
- html (4)
- css (1)
- excel (4)
- myeclipse (2)
- scala (0)
- jQuery (5)
- log (10)
- slf4j (2)
- log4j (9)
- REST (15)
- guava (18)
- Joda-Time (7)
- ini4j (1)
- 配置文件 (2)
- lucene (1)
- database (3)
- curator (2)
- zookeeper (3)
- 并发 (2)
- jetty (6)
- ehcache (5)
- windows (1)
- protobuf (1)
- select2 (2)
- easyui (10)
- Freemarker (1)
- Filter (1)
- twisted (1)
- DateTime (11)
- mockrunner (1)
- DataSource (4)
- ajax (1)
- shell (18)
- powermockito (5)
- json (5)
- lombok (1)
- jointjs (1)
- cookie (1)
- mybatis (11)
- 加密解密 (2)
- 安全 (2)
- web (1)
- notepad++ (3)
- mac (48)
- sublime (14)
- git (7)
- docker (10)
- jar (1)
- gson (5)
- ubuntu (3)
- 模式 (1)
- neo4j (2)
- elasticsearch (1)
- OmniGranffle (1)
- ASCII (1)
- jdbc (3)
- kafka (1)
- MQ (1)
- chrome (3)
- 华为 (1)
- 路由器 (1)
- api (2)
- 架构 (1)
- 设计模式 (1)
- pip (4)
- springboot (48)
- 数据库 (4)
- thread (1)
- java.thread (1)
- sqlite (1)
- postman (1)
- springboot-actuator (2)
- jwt (1)
- token (1)
- brew (9)
- vim (1)
- virtualbox (1)
- Swagger (1)
- spring-retry (3)
- 调度 (1)
- item2 (5)
- graph (12)
- jgrapht (12)
- tuple (1)
- hadoop (5)
- curl (1)
- 算法 (3)
- Jekyll (1)
- github (1)
- ssh-keygen (1)
- zip (2)
- http (2)
- RestTemplate (8)
- 文件处理 (2)
- XStream (1)
- XML (3)
- JAXB (1)
- 笛卡尔积 (2)
- hive (1)
- 搜狗输入法 (1)
- 常用java类 (2)
- nginx (1)
- log4j2 (1)
- drawio (2)
- 安卓 (1)
- 小米 (1)
- okhttp (1)
- requests (1)
- 格式化 (2)
- MySQL Workbench (1)
- 分布式 (1)
- zip4j (1)
- hbase (5)
- hikari (1)
- javers (1)
- pydatetime (4)
- pyassert (1)
- pylog (2)
- tree (2)
- download (1)
- zeppelin (1)
- utils (2)
- wget (1)
- 鼠标 (1)
- 位运算 (2)
- open api (1)
- 域名 (1)
最新评论
-
youngcoder:
haohaohao~
Spring cache 注解功能不起作用的解决方案 -
kanpiaoxue:
lixz 写道有具体实例demo吗好多年前写的了。你还是去官网 ...
spring batch(一):基础部分 -
lixz:
有具体实例demo吗
spring batch(一):基础部分 -
BuDongOrz:
...
Spring MVC controller 读取配置文件 -
hvang1988:
理解错了,原来还是计数,不是时间
spring batch(二):核心部分(1):配置Spring batch
我使用DBCP连接池的时候,发生异常:nested exception is java.sql.SQLRecoverableException: IO Error: Broken pipe
开始怀疑网络有问题,后来同事说这个是连接池里面的链接都是长连接,一直保持与数据库的链接。我用的是Oracle数据库。出于某种原因,Oracle数据库会把很长时间的链接kill掉。这样,连接池里面的长连接,并不知道自身在服务器端已经被kill了,再次发生向数据库的请求连接时,发生上面的异常。
没有办法,我只能写了个方法,来解决这个问题:代码如下:
/** * <pre> * Date:2011-12-29 * 防止发生异常:nested exception is java.sql.SQLRecoverableException: IO Error: Broken pipe * 原因:连接池链接一段时间之后,会被oracle在服务器端中断,而连接池并不知道自己的链接被中断,照旧进行连接操作,发生异常 * @param dataSource * @param oldConn * @return * @throws SQLException * </pre> */ private static Connection getValidConnection(DataSource dataSource,Connection oldConn) throws SQLException { //get the connection from the datasource Connection conn = oldConn; int commonTimeout = 150; //check the connection, if the connection is not suitable, then get the new connection and check it again while(null == conn || conn.isClosed() || !conn.isValid(commonTimeout)) { try { if(null != conn && !conn.isClosed()) { //close the connection conn.close(); } } catch (SQLException e) { logger.error("Can not close connection :\t"+e.getMessage(),e); } //get the new connection conn = dataSource.getConnection(); } //return the valid connection return conn; }
我用的是Spring3.1的框架,使用的是JdbcTemplate来执行存储过程。所以我修改了spring的源码 org.springframework.jdbc.datasource.DataSourceUtils 类里面的 public static Connection getConnection(DataSource dataSource) throws CannotGetJdbcConnectionException 方法,如下:
/* * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.jdbc.datasource; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import javax.sql.DataSource; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.jdbc.CannotGetJdbcConnectionException; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.support.TransactionSynchronizationAdapter; import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.util.Assert; /** * Helper class that provides static methods for obtaining JDBC Connections from * a {@link javax.sql.DataSource}. Includes special support for Spring-managed * transactional Connections, e.g. managed by {@link DataSourceTransactionManager} * or {@link org.springframework.transaction.jta.JtaTransactionManager}. * * <p>Used internally by Spring's {@link org.springframework.jdbc.core.JdbcTemplate}, * Spring's JDBC operation objects and the JDBC {@link DataSourceTransactionManager}. * Can also be used directly in application code. * * @author Rod Johnson * @author Juergen Hoeller * @see #getConnection * @see #releaseConnection * @see DataSourceTransactionManager * @see org.springframework.transaction.jta.JtaTransactionManager * @see org.springframework.transaction.support.TransactionSynchronizationManager */ public abstract class DataSourceUtils { /** * Order value for TransactionSynchronization objects that clean up JDBC Connections. */ public static final int CONNECTION_SYNCHRONIZATION_ORDER = 1000; private static final Log logger = LogFactory.getLog(DataSourceUtils.class); /** * Obtain a Connection from the given DataSource. Translates SQLExceptions into * the Spring hierarchy of unchecked generic data access exceptions, simplifying * calling code and making any exception that is thrown more meaningful. * <p>Is aware of a corresponding Connection bound to the current thread, for example * when using {@link DataSourceTransactionManager}. Will bind a Connection to the * thread if transaction synchronization is active, e.g. when running within a * {@link org.springframework.transaction.jta.JtaTransactionManager JTA} transaction). * @param dataSource the DataSource to obtain Connections from * @return a JDBC Connection from the given DataSource * @throws org.springframework.jdbc.CannotGetJdbcConnectionException * if the attempt to get a Connection failed * @see #releaseConnection */ public static Connection getConnection(DataSource dataSource) throws CannotGetJdbcConnectionException { try { //return doGetConnection(dataSource); //modified here Connection oldConn = doGetConnection(dataSource); return getValidConnection(dataSource, oldConn); } catch (SQLException ex) { throw new CannotGetJdbcConnectionException("Could not get JDBC Connection", ex); } } /** * <pre> * Date:2011-12-29 * 防止发生异常:nested exception is java.sql.SQLRecoverableException: IO Error: Broken pipe * 原因:连接池链接一段时间之后,会被oracle在服务器端中断,而连接池并不知道自己的链接被中断,照旧进行连接操作,发生异常 * @param dataSource * @param oldConn * @return * @throws SQLException * </pre> */ private static Connection getValidConnection(DataSource dataSource,Connection oldConn) throws SQLException { //get the connection from the datasource Connection conn = oldConn; int commonTimeout = 150; //check the connection, if the connection is not suitable, then get the new connection and check it again while(null == conn || conn.isClosed() || !conn.isValid(commonTimeout)) { try { if(null != conn && !conn.isClosed()) { //close the connection conn.close(); } } catch (SQLException e) { logger.error("Can not close connection :\t"+e.getMessage(),e); } //get the new connection conn = dataSource.getConnection(); } //return the valid connection return conn; } /** * Actually obtain a JDBC Connection from the given DataSource. * Same as {@link #getConnection}, but throwing the original SQLException. * <p>Is aware of a corresponding Connection bound to the current thread, for example * when using {@link DataSourceTransactionManager}. Will bind a Connection to the thread * if transaction synchronization is active (e.g. if in a JTA transaction). * <p>Directly accessed by {@link TransactionAwareDataSourceProxy}. * @param dataSource the DataSource to obtain Connections from * @return a JDBC Connection from the given DataSource * @throws SQLException if thrown by JDBC methods * @see #doReleaseConnection */ public static Connection doGetConnection(DataSource dataSource) throws SQLException { Assert.notNull(dataSource, "No DataSource specified"); ConnectionHolder conHolder = (ConnectionHolder) TransactionSynchronizationManager.getResource(dataSource); if (conHolder != null && (conHolder.hasConnection() || conHolder.isSynchronizedWithTransaction())) { conHolder.requested(); if (!conHolder.hasConnection()) { logger.debug("Fetching resumed JDBC Connection from DataSource"); conHolder.setConnection(dataSource.getConnection()); } return conHolder.getConnection(); } // Else we either got no holder or an empty thread-bound holder here. logger.debug("Fetching JDBC Connection from DataSource"); Connection con = dataSource.getConnection(); if (TransactionSynchronizationManager.isSynchronizationActive()) { logger.debug("Registering transaction synchronization for JDBC Connection"); // Use same Connection for further JDBC actions within the transaction. // Thread-bound object will get removed by synchronization at transaction completion. ConnectionHolder holderToUse = conHolder; if (holderToUse == null) { holderToUse = new ConnectionHolder(con); } else { holderToUse.setConnection(con); } holderToUse.requested(); TransactionSynchronizationManager.registerSynchronization( new ConnectionSynchronization(holderToUse, dataSource)); holderToUse.setSynchronizedWithTransaction(true); if (holderToUse != conHolder) { TransactionSynchronizationManager.bindResource(dataSource, holderToUse); } } return con; } /** * Prepare the given Connection with the given transaction semantics. * @param con the Connection to prepare * @param definition the transaction definition to apply * @return the previous isolation level, if any * @throws SQLException if thrown by JDBC methods * @see #resetConnectionAfterTransaction */ public static Integer prepareConnectionForTransaction(Connection con, TransactionDefinition definition) throws SQLException { Assert.notNull(con, "No Connection specified"); // Set read-only flag. if (definition != null && definition.isReadOnly()) { try { if (logger.isDebugEnabled()) { logger.debug("Setting JDBC Connection [" + con + "] read-only"); } con.setReadOnly(true); } catch (SQLException ex) { Throwable exToCheck = ex; while (exToCheck != null) { if (exToCheck.getClass().getSimpleName().contains("Timeout")) { // Assume it's a connection timeout that would otherwise get lost: e.g. from JDBC 4.0 throw ex; } exToCheck = exToCheck.getCause(); } // "read-only not supported" SQLException -> ignore, it's just a hint anyway logger.debug("Could not set JDBC Connection read-only", ex); } catch (RuntimeException ex) { Throwable exToCheck = ex; while (exToCheck != null) { if (exToCheck.getClass().getSimpleName().contains("Timeout")) { // Assume it's a connection timeout that would otherwise get lost: e.g. from Hibernate throw ex; } exToCheck = exToCheck.getCause(); } // "read-only not supported" UnsupportedOperationException -> ignore, it's just a hint anyway logger.debug("Could not set JDBC Connection read-only", ex); } } // Apply specific isolation level, if any. Integer previousIsolationLevel = null; if (definition != null && definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) { if (logger.isDebugEnabled()) { logger.debug("Changing isolation level of JDBC Connection [" + con + "] to " + definition.getIsolationLevel()); } int currentIsolation = con.getTransactionIsolation(); if (currentIsolation != definition.getIsolationLevel()) { previousIsolationLevel = currentIsolation; con.setTransactionIsolation(definition.getIsolationLevel()); } } return previousIsolationLevel; } /** * Reset the given Connection after a transaction, * regarding read-only flag and isolation level. * @param con the Connection to reset * @param previousIsolationLevel the isolation level to restore, if any * @see #prepareConnectionForTransaction */ public static void resetConnectionAfterTransaction(Connection con, Integer previousIsolationLevel) { Assert.notNull(con, "No Connection specified"); try { // Reset transaction isolation to previous value, if changed for the transaction. if (previousIsolationLevel != null) { if (logger.isDebugEnabled()) { logger.debug("Resetting isolation level of JDBC Connection [" + con + "] to " + previousIsolationLevel); } con.setTransactionIsolation(previousIsolationLevel); } // Reset read-only flag. if (con.isReadOnly()) { if (logger.isDebugEnabled()) { logger.debug("Resetting read-only flag of JDBC Connection [" + con + "]"); } con.setReadOnly(false); } } catch (Throwable ex) { logger.debug("Could not reset JDBC Connection after transaction", ex); } } /** * Determine whether the given JDBC Connection is transactional, that is, * bound to the current thread by Spring's transaction facilities. * @param con the Connection to check * @param dataSource the DataSource that the Connection was obtained from * (may be <code>null</code>) * @return whether the Connection is transactional */ public static boolean isConnectionTransactional(Connection con, DataSource dataSource) { if (dataSource == null) { return false; } ConnectionHolder conHolder = (ConnectionHolder) TransactionSynchronizationManager.getResource(dataSource); return (conHolder != null && connectionEquals(conHolder, con)); } /** * Apply the current transaction timeout, if any, * to the given JDBC Statement object. * @param stmt the JDBC Statement object * @param dataSource the DataSource that the Connection was obtained from * @throws SQLException if thrown by JDBC methods * @see java.sql.Statement#setQueryTimeout */ public static void applyTransactionTimeout(Statement stmt, DataSource dataSource) throws SQLException { applyTimeout(stmt, dataSource, 0); } /** * Apply the specified timeout - overridden by the current transaction timeout, * if any - to the given JDBC Statement object. * @param stmt the JDBC Statement object * @param dataSource the DataSource that the Connection was obtained from * @param timeout the timeout to apply (or 0 for no timeout outside of a transaction) * @throws SQLException if thrown by JDBC methods * @see java.sql.Statement#setQueryTimeout */ public static void applyTimeout(Statement stmt, DataSource dataSource, int timeout) throws SQLException { Assert.notNull(stmt, "No Statement specified"); Assert.notNull(dataSource, "No DataSource specified"); ConnectionHolder holder = (ConnectionHolder) TransactionSynchronizationManager.getResource(dataSource); if (holder != null && holder.hasTimeout()) { // Remaining transaction timeout overrides specified value. stmt.setQueryTimeout(holder.getTimeToLiveInSeconds()); } else if (timeout > 0) { // No current transaction timeout -> apply specified value. stmt.setQueryTimeout(timeout); } } /** * Close the given Connection, obtained from the given DataSource, * if it is not managed externally (that is, not bound to the thread). * @param con the Connection to close if necessary * (if this is <code>null</code>, the call will be ignored) * @param dataSource the DataSource that the Connection was obtained from * (may be <code>null</code>) * @see #getConnection */ public static void releaseConnection(Connection con, DataSource dataSource) { try { doReleaseConnection(con, dataSource); } catch (SQLException ex) { logger.debug("Could not close JDBC Connection", ex); } catch (Throwable ex) { logger.debug("Unexpected exception on closing JDBC Connection", ex); } } /** * Actually close the given Connection, obtained from the given DataSource. * Same as {@link #releaseConnection}, but throwing the original SQLException. * <p>Directly accessed by {@link TransactionAwareDataSourceProxy}. * @param con the Connection to close if necessary * (if this is <code>null</code>, the call will be ignored) * @param dataSource the DataSource that the Connection was obtained from * (may be <code>null</code>) * @throws SQLException if thrown by JDBC methods * @see #doGetConnection */ public static void doReleaseConnection(Connection con, DataSource dataSource) throws SQLException { if (con == null) { return; } if (dataSource != null) { ConnectionHolder conHolder = (ConnectionHolder) TransactionSynchronizationManager.getResource(dataSource); if (conHolder != null && connectionEquals(conHolder, con)) { // It's the transactional Connection: Don't close it. conHolder.released(); return; } } // Leave the Connection open only if the DataSource is our // special SmartDataSoruce and it wants the Connection left open. if (!(dataSource instanceof SmartDataSource) || ((SmartDataSource) dataSource).shouldClose(con)) { logger.debug("Returning JDBC Connection to DataSource"); con.close(); } } /** * Determine whether the given two Connections are equal, asking the target * Connection in case of a proxy. Used to detect equality even if the * user passed in a raw target Connection while the held one is a proxy. * @param conHolder the ConnectionHolder for the held Connection (potentially a proxy) * @param passedInCon the Connection passed-in by the user * (potentially a target Connection without proxy) * @return whether the given Connections are equal * @see #getTargetConnection */ private static boolean connectionEquals(ConnectionHolder conHolder, Connection passedInCon) { if (!conHolder.hasConnection()) { return false; } Connection heldCon = conHolder.getConnection(); // Explicitly check for identity too: for Connection handles that do not implement // "equals" properly, such as the ones Commons DBCP exposes). return (heldCon == passedInCon || heldCon.equals(passedInCon) || getTargetConnection(heldCon).equals(passedInCon)); } /** * Return the innermost target Connection of the given Connection. If the given * Connection is a proxy, it will be unwrapped until a non-proxy Connection is * found. Otherwise, the passed-in Connection will be returned as-is. * @param con the Connection proxy to unwrap * @return the innermost target Connection, or the passed-in one if no proxy * @see ConnectionProxy#getTargetConnection() */ public static Connection getTargetConnection(Connection con) { Connection conToUse = con; while (conToUse instanceof ConnectionProxy) { conToUse = ((ConnectionProxy) conToUse).getTargetConnection(); } return conToUse; } /** * Determine the connection synchronization order to use for the given * DataSource. Decreased for every level of nesting that a DataSource * has, checked through the level of DelegatingDataSource nesting. * @param dataSource the DataSource to check * @return the connection synchronization order to use * @see #CONNECTION_SYNCHRONIZATION_ORDER */ private static int getConnectionSynchronizationOrder(DataSource dataSource) { int order = CONNECTION_SYNCHRONIZATION_ORDER; DataSource currDs = dataSource; while (currDs instanceof DelegatingDataSource) { order--; currDs = ((DelegatingDataSource) currDs).getTargetDataSource(); } return order; } /** * Callback for resource cleanup at the end of a non-native JDBC transaction * (e.g. when participating in a JtaTransactionManager transaction). * @see org.springframework.transaction.jta.JtaTransactionManager */ private static class ConnectionSynchronization extends TransactionSynchronizationAdapter { private final ConnectionHolder connectionHolder; private final DataSource dataSource; private int order; private boolean holderActive = true; public ConnectionSynchronization(ConnectionHolder connectionHolder, DataSource dataSource) { this.connectionHolder = connectionHolder; this.dataSource = dataSource; this.order = getConnectionSynchronizationOrder(dataSource); } @Override public int getOrder() { return this.order; } @Override public void suspend() { if (this.holderActive) { TransactionSynchronizationManager.unbindResource(this.dataSource); if (this.connectionHolder.hasConnection() && !this.connectionHolder.isOpen()) { // Release Connection on suspend if the application doesn't keep // a handle to it anymore. We will fetch a fresh Connection if the // application accesses the ConnectionHolder again after resume, // assuming that it will participate in the same transaction. releaseConnection(this.connectionHolder.getConnection(), this.dataSource); this.connectionHolder.setConnection(null); } } } @Override public void resume() { if (this.holderActive) { TransactionSynchronizationManager.bindResource(this.dataSource, this.connectionHolder); } } @Override public void beforeCompletion() { // Release Connection early if the holder is not open anymore // (that is, not used by another resource like a Hibernate Session // that has its own cleanup via transaction synchronization), // to avoid issues with strict JTA implementations that expect // the close call before transaction completion. if (!this.connectionHolder.isOpen()) { TransactionSynchronizationManager.unbindResource(this.dataSource); this.holderActive = false; if (this.connectionHolder.hasConnection()) { releaseConnection(this.connectionHolder.getConnection(), this.dataSource); } } } @Override public void afterCompletion(int status) { // If we haven't closed the Connection in beforeCompletion, // close it now. The holder might have been used for other // cleanup in the meantime, for example by a Hibernate Session. if (this.holderActive) { // The thread-bound ConnectionHolder might not be available anymore, // since afterCompletion might get called from a different thread. TransactionSynchronizationManager.unbindResourceIfPossible(this.dataSource); this.holderActive = false; if (this.connectionHolder.hasConnection()) { releaseConnection(this.connectionHolder.getConnection(), this.dataSource); // Reset the ConnectionHolder: It might remain bound to the thread. this.connectionHolder.setConnection(null); } } this.connectionHolder.reset(); } } }
发表评论
-
swagger生成javaAPI的server&client代码
2021-03-25 11:05 920文章原文: 《Spring Boot: API ... -
springboot 返回JSON日期格式问题
2021-03-24 16:36 1096springboot返回的时间格式,根据版本的不同,可能返回 ... -
在其他项目中如何依赖一个springboot的jar?
2021-03-17 16:08 614资料:How to add a dependency ... -
指定java stream中并行处理的线程池大小
2021-03-04 11:38 1565Java8实战:并行线程池 写道 并行流内部使用了默认的F ... -
Can we disable the default web server in the Spring Boot application?
2021-02-22 11:07 269The major strong point in S ... -
Java 8 Comparator: How to Sort a List
2021-02-22 10:54 331文章地址: https://dzone.com/art ... -
Java Getter and Setter: Basics, Common Mistakes, and Best Practices
2021-02-22 10:19 496文章地址: https://dzone.com/ar ... -
Java String Format Examples
2021-02-22 10:14 302参考资料地址: 文章地址: https://dzo ... -
位运算&位掩码示例(权限)
2021-02-10 14:26 446参考资料地址: 1、https://juejin. ... -
Java 位移运算符
2021-02-08 16:21 403参考文章: 1、【 ... -
java中tree的应用示例:javax.swing.tree.DefaultMutableTreeNode
2021-02-03 15:03 491package org.kanpiaoxue. ... -
数据分页逻辑
2021-01-20 17:48 304//当前页 int intPage = I ... -
eclipse导入导出Snippets
2021-01-20 10:45 360导出: Display the snippets v ... -
eclipse迁移配置、插件(导出/导入快捷键、代码风格等等)
2021-01-20 10:28 732有的时候需要从一个eclipse导出它的所有配置,比如 ... -
eclipse需要的jdk版本查询
2021-01-18 11:38 482现在jdk的版本升级太快,eclipse的升级也 ... -
mac查看JAVA_HOME
2021-01-17 00:37 730在mac里面安装好java之后需要设置JAVA_HOM ... -
单例模式
2021-01-14 10:03 263参考资料: https://dzone.com/art ... -
计算工作日期的java工具类
2020-12-31 10:55 306import org.apache.common ... -
java的四舍五入
2020-12-30 11:59 454参考文章: https://www.cnblogs.c ... -
存储单位工具类(来自于hadoop)
2020-12-25 17:30 203/** * 存储单位工具类 * @ClassN ...
相关推荐
在linux上通过JDBC连接ORACLE 时总是出现 java.sql.SQLRecoverableException: IO Error: Connection reset 的问题
### 关于 SQL Server ErrorLog 错误日志的详细说明 #### 一、ErrorLog 文件的基本概念 在SQL Server中,ErrorLog 文件是系统自动生成的日志文件之一,用于记录SQL Server实例运行过程中发生的错误信息和其他重要...
另外,考虑使用`@Transactional`注解或编程式事务管理来处理复杂的事务逻辑。 总之,这个实例展示了如何利用MyBatis连接Oracle数据库并执行基本的查询操作。通过理解上述步骤,你可以根据需求扩展到其他类型的...
当数据库发生错误时,Application Continuity会触发异常,如SQLRecoverableException,允许应用程序优雅地处理错误并决定是否重试事务。 3. **Application Design Considerations**:在设计应用程序时,开发者需要...
基于java学生宿舍管理系统设计与实现.docx
2023-04-06-项目笔记-第二百六十一阶段-课前小分享_小分享1.坚持提交gitee 小分享2.作业中提交代码 小分享3.写代码注意代码风格 4.3.1变量的使用 4.4变量的作用域与生命周期 4.4.1局部变量的作用域 4.4.2全局变量的作用域 4.4.2.1全局变量的作用域_1 4.4.2.259局变量的作用域_259- 2024-09-19
小程序-轻客洗衣.zip
基于java的海鲜自助餐厅系统设计与实现.docx
基于java的英语单词学习网站设计与实现.docx
基于java旅游信息网站设计与实现.docx
1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。、资源 5来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。、资 5源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。
内容概要:文中介绍了智能网联汽车(ICV)在全球范围内成为了汽车产业的热点,并且伴随车辆连通程度的上升而提升了基于数据分析的产品研发和服务扩展的比重,使得数据资产的重要性显著提高。在国家重视数据市场的发展之下,智能网联汽车的数据价值潜力巨大。本文从数据流通可能的应用情景切入,分析适用于ICV的资料元素规范,并诊断国内ICV资料流转面临的挑战并给出了改进对策。 适合人群:智能网联汽车领域内的从业人员,尤其是专注技术研发以及相关政策标准研究人员。 使用场景及目标:适用于从事智能网联汽车研发生产和数据应用的设计与规划,以及为未来的数据流动建立合理的模式。具体来讲,涵盖改善供应链信息流、优化交通管控、强化道路信息服务以及增强无人驾驶系统算法训练的效果等方面的工作。 其他说明:未来工作的重点领域集中在数据流通策略、技术验证和发展关键技术创新方面,以确保整个智能网联汽车行业可持续健康发展。
本文对绿色算力的概念进行了阐述,认为绿色算力是算力基础设施与生态保护有机结合的综合能力,并将其划分为算力设施、设备、平台、应用‘四位一体’协调发展的方式。通过分析绿色算力的含义、研究现状及关键技术(涵盖算力设备绿色技术、节能减排技术等)对其未来做出预测并给出了建议。此外还探讨了如何通过技术创新提高效率及推动全行业的数字化绿色化进程。 适合人群:电信、互联网数据中心、云技术提供商相关人员,对数据中心能耗管控及可持续发展战略有兴趣的决策人员等。 使用场景及目标:①用于数据中心绿色技术的应用;②助力企业或组织机构打造高效且环境友好的算力基础设施和服务;③帮助政策决策者和标准制制机构理解和确立相关方针策略。 其他注意事项:绿色算力不仅有助于环境保护,而且有助于企业削减运营费用,提高市场竞争力。文中提及的各项新技术、新方法有望成为未来的热门话题及发展方向。
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
基于深度确定性策略梯度的UAV辅助移动边缘计算计算卸载优化python源码.zip基于深度确定性策略梯度的UAV辅助移动边缘计算计算卸载优化python源码.zip 个人大四的毕业设计、课程设计、作业、经导师指导并认可通过的高分设计项目,评审平均分达96.5分。主要针对计算机相关专业的正在做毕设的学生和需要项目实战练习的学习者,也可作为课程设计、期末大作业。 [资源说明] 不懂运行,下载完可以私聊问,可远程教学 该资源内项目源码是个人的毕设或者课设、作业,代码都测试ok,都是运行成功后才上传资源,答辩评审平均分达到96.5分,放心下载使用! 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.md文件(如有),供学习参考。
项目工程资源经过严格测试可直接运行成功且功能正常的情况才上传,可轻松复刻,拿到资料包后可轻松复现出一样的项目,本人系统开发经验充足(全领域),有任何使用问题欢迎随时与我联系,我会及时为您解惑,提供帮助。 【资源内容】:包含完整源码+工程文件+说明(如有)等。答辩评审平均分达到96分,放心下载使用!可轻松复现,设计报告也可借鉴此项目,该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的。 【提供帮助】:有任何使用问题欢迎随时与我联系,我会及时解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 下载后请首先打开README文件(如有),项目工程可直接复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用
均包含代码,文章,部分项目包含ppt
1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看REaDME.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。
均包含代码,文章,部分项目包含ppt
1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。