diff --git a/mybatis-flex-spring/src/main/java/com/mybatisflex/spring/FlexSqlSessionFactoryBean.java b/mybatis-flex-spring/src/main/java/com/mybatisflex/spring/FlexSqlSessionFactoryBean.java index 06bcf34f..2ae4b155 100644 --- a/mybatis-flex-spring/src/main/java/com/mybatisflex/spring/FlexSqlSessionFactoryBean.java +++ b/mybatis-flex-spring/src/main/java/com/mybatisflex/spring/FlexSqlSessionFactoryBean.java @@ -46,7 +46,6 @@ import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationListener; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.event.ContextRefreshedEvent; -import org.springframework.core.NestedIOException; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver; @@ -565,7 +564,7 @@ public class FlexSqlSessionFactoryBean extends SqlSessionFactoryBean try { targetConfiguration.setDatabaseId(this.databaseIdProvider.getDatabaseId(this.dataSource)); } catch (SQLException e) { - throw new NestedIOException("Failed getting a databaseId", e); + throw new IOException("Failed getting a databaseId", e); } } @@ -576,7 +575,7 @@ public class FlexSqlSessionFactoryBean extends SqlSessionFactoryBean xmlConfigBuilder.parse(); LOGGER.debug(() -> "Parsed configuration file: '" + this.configLocation + "'"); } catch (Exception ex) { - throw new NestedIOException("Failed to parse config resource: " + this.configLocation, ex); + throw new IOException("Failed to parse config resource: " + this.configLocation, ex); } finally { ErrorContext.instance().reset(); } @@ -599,7 +598,7 @@ public class FlexSqlSessionFactoryBean extends SqlSessionFactoryBean targetConfiguration, mapperLocation.toString(), targetConfiguration.getSqlFragments()); xmlMapperBuilder.parse(); } catch (Exception e) { - throw new NestedIOException("Failed to parse mapping resource: '" + mapperLocation + "'", e); + throw new IOException("Failed to parse mapping resource: '" + mapperLocation + "'", e); } finally { ErrorContext.instance().reset(); }