mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
remove NestedIOException
This commit is contained in:
parent
377f90e9eb
commit
ae246117c6
@ -46,7 +46,6 @@ import org.springframework.context.ApplicationEvent;
|
|||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
import org.springframework.context.ConfigurableApplicationContext;
|
import org.springframework.context.ConfigurableApplicationContext;
|
||||||
import org.springframework.context.event.ContextRefreshedEvent;
|
import org.springframework.context.event.ContextRefreshedEvent;
|
||||||
import org.springframework.core.NestedIOException;
|
|
||||||
import org.springframework.core.io.Resource;
|
import org.springframework.core.io.Resource;
|
||||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||||
@ -565,7 +564,7 @@ public class FlexSqlSessionFactoryBean extends SqlSessionFactoryBean
|
|||||||
try {
|
try {
|
||||||
targetConfiguration.setDatabaseId(this.databaseIdProvider.getDatabaseId(this.dataSource));
|
targetConfiguration.setDatabaseId(this.databaseIdProvider.getDatabaseId(this.dataSource));
|
||||||
} catch (SQLException e) {
|
} 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();
|
xmlConfigBuilder.parse();
|
||||||
LOGGER.debug(() -> "Parsed configuration file: '" + this.configLocation + "'");
|
LOGGER.debug(() -> "Parsed configuration file: '" + this.configLocation + "'");
|
||||||
} catch (Exception ex) {
|
} 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 {
|
} finally {
|
||||||
ErrorContext.instance().reset();
|
ErrorContext.instance().reset();
|
||||||
}
|
}
|
||||||
@ -599,7 +598,7 @@ public class FlexSqlSessionFactoryBean extends SqlSessionFactoryBean
|
|||||||
targetConfiguration, mapperLocation.toString(), targetConfiguration.getSqlFragments());
|
targetConfiguration, mapperLocation.toString(), targetConfiguration.getSqlFragments());
|
||||||
xmlMapperBuilder.parse();
|
xmlMapperBuilder.parse();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new NestedIOException("Failed to parse mapping resource: '" + mapperLocation + "'", e);
|
throw new IOException("Failed to parse mapping resource: '" + mapperLocation + "'", e);
|
||||||
} finally {
|
} finally {
|
||||||
ErrorContext.instance().reset();
|
ErrorContext.instance().reset();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user