File tree 1 file changed +3
-4
lines changed
src/main/java/org/mybatis/spring
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 54
54
import org .mybatis .spring .transaction .SpringManagedTransactionFactory ;
55
55
import org .springframework .beans .factory .FactoryBean ;
56
56
import org .springframework .beans .factory .InitializingBean ;
57
- import org .springframework .context .ApplicationEvent ;
58
57
import org .springframework .context .ApplicationListener ;
59
58
import org .springframework .context .ConfigurableApplicationContext ;
60
59
import org .springframework .context .event .ContextRefreshedEvent ;
87
86
* @see #setDataSource
88
87
*/
89
88
public class SqlSessionFactoryBean
90
- implements FactoryBean <SqlSessionFactory >, InitializingBean , ApplicationListener <ApplicationEvent > {
89
+ implements FactoryBean <SqlSessionFactory >, InitializingBean , ApplicationListener <ContextRefreshedEvent > {
91
90
92
91
private static final Logger LOGGER = LoggerFactory .getLogger (SqlSessionFactoryBean .class );
93
92
@@ -658,8 +657,8 @@ public boolean isSingleton() {
658
657
* {@inheritDoc}
659
658
*/
660
659
@ Override
661
- public void onApplicationEvent (ApplicationEvent event ) {
662
- if (failFast && event instanceof ContextRefreshedEvent ) {
660
+ public void onApplicationEvent (ContextRefreshedEvent event ) {
661
+ if (failFast ) {
663
662
// fail-fast -> check all statements are completed
664
663
this .sqlSessionFactory .getConfiguration ().getMappedStatementNames ();
665
664
}
You can’t perform that action at this time.
0 commit comments