Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2010-2022 the original author or authors.
Copyright 2010-2023 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.
Expand Down Expand Up @@ -105,7 +105,7 @@
<osgi.import>org.springframework.batch.*;resolution:=optional,*</osgi.import>
<osgi.dynamicImport>*</osgi.dynamicImport>

<mybatis.version>3.5.11</mybatis.version>
<mybatis.version>3.5.13</mybatis.version>
<spring.version>5.3.24</spring.version>
<spring-batch.version>4.3.7</spring-batch.version>
<module.name>org.mybatis.spring</module.name>
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/org/mybatis/spring/SqlSessionFactoryBean.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 the original author or authors.
* Copyright 2010-2023 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.
Expand Down Expand Up @@ -54,7 +54,6 @@
import org.mybatis.spring.transaction.SpringManagedTransactionFactory;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.event.ContextRefreshedEvent;
Expand Down Expand Up @@ -87,7 +86,7 @@
* @see #setDataSource
*/
public class SqlSessionFactoryBean
implements FactoryBean<SqlSessionFactory>, InitializingBean, ApplicationListener<ApplicationEvent> {
implements FactoryBean<SqlSessionFactory>, InitializingBean, ApplicationListener<ContextRefreshedEvent> {

private static final Logger LOGGER = LoggerFactory.getLogger(SqlSessionFactoryBean.class);

Expand Down Expand Up @@ -658,8 +657,8 @@ public boolean isSingleton() {
* {@inheritDoc}
*/
@Override
public void onApplicationEvent(ApplicationEvent event) {
if (failFast && event instanceof ContextRefreshedEvent) {
public void onApplicationEvent(ContextRefreshedEvent event) {
if (failFast) {
// fail-fast -> check all statements are completed
this.sqlSessionFactory.getConfiguration().getMappedStatementNames();
}
Expand Down