Skip to content

Commit 78371a6

Browse files
authored
Merge pull request mybatis#808 from kazuki43zoo/apply-changes-on-master-at-20230513
Apply changes to 2.1.x on master at 20230513
2 parents c2b0ec8 + 7373547 commit 78371a6

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2010-2022 the original author or authors.
4+
Copyright 2010-2023 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -105,7 +105,7 @@
105105
<osgi.import>org.springframework.batch.*;resolution:=optional,*</osgi.import>
106106
<osgi.dynamicImport>*</osgi.dynamicImport>
107107

108-
<mybatis.version>3.5.11</mybatis.version>
108+
<mybatis.version>3.5.13</mybatis.version>
109109
<spring.version>5.3.24</spring.version>
110110
<spring-batch.version>4.3.7</spring-batch.version>
111111
<module.name>org.mybatis.spring</module.name>

src/main/java/org/mybatis/spring/SqlSessionFactoryBean.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2022 the original author or authors.
2+
* Copyright 2010-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -54,7 +54,6 @@
5454
import org.mybatis.spring.transaction.SpringManagedTransactionFactory;
5555
import org.springframework.beans.factory.FactoryBean;
5656
import org.springframework.beans.factory.InitializingBean;
57-
import org.springframework.context.ApplicationEvent;
5857
import org.springframework.context.ApplicationListener;
5958
import org.springframework.context.ConfigurableApplicationContext;
6059
import org.springframework.context.event.ContextRefreshedEvent;
@@ -87,7 +86,7 @@
8786
* @see #setDataSource
8887
*/
8988
public class SqlSessionFactoryBean
90-
implements FactoryBean<SqlSessionFactory>, InitializingBean, ApplicationListener<ApplicationEvent> {
89+
implements FactoryBean<SqlSessionFactory>, InitializingBean, ApplicationListener<ContextRefreshedEvent> {
9190

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

@@ -658,8 +657,8 @@ public boolean isSingleton() {
658657
* {@inheritDoc}
659658
*/
660659
@Override
661-
public void onApplicationEvent(ApplicationEvent event) {
662-
if (failFast && event instanceof ContextRefreshedEvent) {
660+
public void onApplicationEvent(ContextRefreshedEvent event) {
661+
if (failFast) {
663662
// fail-fast -> check all statements are completed
664663
this.sqlSessionFactory.getConfiguration().getMappedStatementNames();
665664
}

0 commit comments

Comments
 (0)