1
1
/*
2
- * Copyright 2010-2021 the original author or authors.
2
+ * Copyright 2010-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
58
58
import org .springframework .context .ApplicationListener ;
59
59
import org .springframework .context .ConfigurableApplicationContext ;
60
60
import org .springframework .context .event .ContextRefreshedEvent ;
61
- import org .springframework .core .NestedIOException ;
62
61
import org .springframework .core .io .Resource ;
63
62
import org .springframework .core .io .support .PathMatchingResourcePatternResolver ;
64
63
import org .springframework .core .io .support .ResourcePatternResolver ;
82
81
* @author Eduardo Macarron
83
82
* @author Eddú Meléndez
84
83
* @author Kazuki Shimizu
84
+ * @author Jens Schauder
85
85
*
86
86
* @see #setConfigLocation
87
87
* @see #setDataSource
@@ -576,7 +576,7 @@ protected SqlSessionFactory buildSqlSessionFactory() throws Exception {
576
576
try {
577
577
targetConfiguration .setDatabaseId (this .databaseIdProvider .getDatabaseId (this .dataSource ));
578
578
} catch (SQLException e ) {
579
- throw new NestedIOException ("Failed getting a databaseId" , e );
579
+ throw new IOException ("Failed getting a databaseId" , e );
580
580
}
581
581
}
582
582
@@ -587,7 +587,7 @@ protected SqlSessionFactory buildSqlSessionFactory() throws Exception {
587
587
xmlConfigBuilder .parse ();
588
588
LOGGER .debug (() -> "Parsed configuration file: '" + this .configLocation + "'" );
589
589
} catch (Exception ex ) {
590
- throw new NestedIOException ("Failed to parse config resource: " + this .configLocation , ex );
590
+ throw new IOException ("Failed to parse config resource: " + this .configLocation , ex );
591
591
} finally {
592
592
ErrorContext .instance ().reset ();
593
593
}
@@ -610,7 +610,7 @@ protected SqlSessionFactory buildSqlSessionFactory() throws Exception {
610
610
targetConfiguration , mapperLocation .toString (), targetConfiguration .getSqlFragments ());
611
611
xmlMapperBuilder .parse ();
612
612
} catch (Exception e ) {
613
- throw new NestedIOException ("Failed to parse mapping resource: '" + mapperLocation + "'" , e );
613
+ throw new IOException ("Failed to parse mapping resource: '" + mapperLocation + "'" , e );
614
614
} finally {
615
615
ErrorContext .instance ().reset ();
616
616
}
0 commit comments