You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this change, following specification changes applied.
Auto configuration of language driver bean
Support to configure above three plugin language driver bean when same type bean not present in DI container.
Detecting language driver bean
Support to detect a language driver bean from DI container. You can register any scripting language driver to MyBatis and If target bean count is one, it has been configured to the default scripting language driver.
Support to customize a ThymeleafLanguageDriver creating by auto-configure (= detecting a ThymeleafLanguageDriverConfig bean). You can customize it as follow:
Configuration property for default scripting language driver
Support to set a default scripting language driver by configuration property as follow:
mybatis.default-scripting-language-driver=FQCN
About no backward compatibility
Description
In this change, there is no backward compatibility for existing application when the following all conditions are matched (Please be careful when updating).
The plugin language driver(mybatis-freemarker,mybatis-velocity, mybatis-thymeleaf) included one in classpath (= used one of plugin language driver)
The default scripting language is not plugin language driver(= used built-in language driver(XMLLanguageDriver, RawLanguageDriver) or custom language driver).
If above all conditions are matched, auto-configure of new version set the plugin language driver to default language driver.
Solution for broken backward compatibility
Please set the default scripting language driver using new configuration property(mybatis.default-scripting-language-driver).
e.g.) When you use the XMLLanguageDriver as default language driver
kazuki43zoo
changed the title
Support auto-configure LanguageDriver provided by sub module
Support auto-configure LanguageDriver provided by MyBatis's sub module
Mar 9, 2019
I consider to support auto-configure for following language drivers.
Specifications
In this change, following specification changes applied.
Auto configuration of language driver bean
Support to configure above three plugin language driver bean when same type bean not present in DI container.
Detecting language driver bean
Support to detect a language driver bean from DI container. You can register any scripting language driver to MyBatis and If target bean count is one, it has been configured to the default scripting language driver.
Customization for ThymeleafLanguageDriver
Support to customize a ThymeleafLanguageDriver creating by auto-configure (= detecting a
ThymeleafLanguageDriverConfig
bean). You can customize it as follow:Configuration property for default scripting language driver
Support to set a default scripting language driver by configuration property as follow:
mybatis.default-scripting-language-driver=FQCN
About no backward compatibility
Description
In this change, there is no backward compatibility for existing application when the following all conditions are matched (Please be careful when updating).
XMLLanguageDriver
,RawLanguageDriver
) or custom language driver).If above all conditions are matched, auto-configure of new version set the plugin language driver to default language driver.
Solution for broken backward compatibility
Please set the default scripting language driver using new configuration property(
mybatis.default-scripting-language-driver
).e.g.) When you use the
XMLLanguageDriver
as default language drivermybatis.default-scripting-language-driver=org.apache.ibatis.scripting.xmltags.XMLLanguageDriver
How to exclude this change
If you want to ignore this change, please set configuration property as follow:
spring.autoconfigure.exclude=org.mybatis.spring.boot.autoconfigure.MybatisLanguageDriverAutoConfiguration
See https://docs.spring.io/spring-boot/docs/2.1.6.RELEASE/reference/htmlsingle/#using-boot-disabling-specific-auto-configuration.
Note
This change depends on mybatis-spring 2.0.2.
Related Links
The text was updated successfully, but these errors were encountered: