Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to MyBatis 3.5.17 #1033

Merged
merged 1 commit into from
Nov 26, 2024
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2023 the original author or authors.
* Copyright 2015-2024 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 @@ -33,6 +33,7 @@
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.TypeHandler;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
Expand Down Expand Up @@ -446,6 +447,7 @@ public void setAggressiveLazyLoading(Boolean aggressiveLazyLoading) {
this.aggressiveLazyLoading = aggressiveLazyLoading;
}

@DeprecatedConfigurationProperty(since = "3.0.4", reason = "The option is not used at MyBatis core module. It will be removed in the future. See https://github.com/mybatis/mybatis-3/pull/3238")
public Boolean getMultipleResultSetsEnabled() {
return multipleResultSetsEnabled;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ void testWithCustomizeCoreConfiguration() {
.withPropertyValues("mybatis.configuration.aggressive-lazy-loading:true")
.run(context -> assertThat(
context.getBean(SqlSessionFactory.class).getConfiguration().isAggressiveLazyLoading()).isTrue()),
// Since MyBatis 3.5.17, the return value of isMultipleResultSetsEnabled() is always true
// See https://github.com/mybatis/mybatis-3/pull/3238
() -> this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
.withPropertyValues("mybatis.configuration.multiple-result-sets-enabled:false")
.run(context -> assertThat(
context.getBean(SqlSessionFactory.class).getConfiguration().isMultipleResultSetsEnabled()).isFalse()),
context.getBean(SqlSessionFactory.class).getConfiguration().isMultipleResultSetsEnabled()).isTrue()),
() -> this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
.withPropertyValues("mybatis.configuration.use-generated-keys:true")
.run(context -> assertThat(context.getBean(SqlSessionFactory.class).getConfiguration().isUseGeneratedKeys())
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<java.version>17</java.version>
<java.release.version>17</java.release.version>

<mybatis.version>3.5.16</mybatis.version>
<mybatis.version>3.5.17</mybatis.version>
<mybatis-spring.version>3.0.4</mybatis-spring.version>
<mybatis-freemarker.version>1.3.0</mybatis-freemarker.version>
<mybatis-velocity.version>2.3.0</mybatis-velocity.version>
Expand Down