-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Incompatible type between Configuration SqlSessionFactoryBean and MybatisProperties #959
Comments
Hello @szopal , I moved the issue to mybais-spring-boot-starter repo. See if ConfigurationCustomizer or SqlSessionFactoryBeanCustomizer helps. There also seems to be a case that is not covered currently. See #928 . If none of the above helps, please elaborate on the usage details. |
I'm not sure if you understand me - In previous version (2.x) I customize SqlSessionFactory like this:
The main part of code is:
But now, I have to do like this:
Because configuration from MybatisProperties is different type and it can't be rewrite automatically. But, maybe I do something wrong - If yes, please let me know. |
This changed in 3.0. There's a more concise way to write your code: if (properties.getConfiguration() != null) {
final Configuration configuration = new Configuration();
properties.getConfiguration().applyTo(configuration);
factoryBean.setConfiguration(configuration);
} |
Thank very much! Now I can see it's changed in 3.0. |
closing issue as seems resolved. |
After upgrade mybatis version to 3.0.3 I can't customize SqlSessionFactory because I can't set mybatis properties configuration like I did in 2.3.1
There is error:
The text was updated successfully, but these errors were encountered: