We are pleased to announce three new releases.
MyBatis 3.4.0 with the following main features:
- New Cursor List method in SqlSession.
- Inherit Spring timeout in transactions.
- Better support for generic types.
- Out-of-the-box support new Date and Time API (JSR-310) classes added in Java 8.
Note that there are changes that may break existing code.
- New method getTimeout() in the Transaction interface. If you implemented your own transaction adapter you will need to implement this method at least with a "return null"
- @Options( flushCache ) now takes enum values (DEFAULT/TRUE/FALSE) instead of boolean.
- StatementHandler#prepare(Connection) has been changed to StatementHandler#prepare(Connection,Integer) given that now it gets the transaction timeout.
See the details at the project's tracker
MyBatis-Spring 1.3.0 with:
- Support for Cursor List (also for Spring Batch)
- Requires MyBatis 3.4.0
See the details at the project's tracker
And MyBatis-Spring-Boot-Starter 1.1.1 that includes:
- Autoscan will only pick interfaces annotated with @Mapper. Note that this change is backward incompatible. In case you are not using the @MapperScan annotation you should mark your mappers with the new @Mapper annotation shipped with MyBatis 3.4.0.
- Requires MyBatis-Spring 1.3.0
- And yes... your suspicions are correct, there is no 1.1.0 version. In fact, it is in maven central but the artifact is wrong :)
See the details at the project's tracker
Please see the GitHub project for the details.
Non-maven users can download the binary distribution from Github releases.
Thanks to people who is contributing with PRs.
Enjoy!
thank you for springboot support
ReplyDeleteI am getting below exception, when trying to connect database.
During debugging, I have found springboot is reading properties file and created datasource successfully.
But mybatis is throwing NPE, as environemnt is NULL, can you help resolve this issue?
Caused by: java.lang.NullPointerException: null
at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:95) ~[mybatis-3.4.0.jar:3.4.0]
... 15 common frames omitted
How do I use the jsr-310 support? Using a constructor argument as in `@Arg(column = "dateLastUpdated", javaType = LocalDate.class)` fails.
ReplyDeleteOk, it's not quite "out of the box", but I have found the solution. You need to include the `mybatis-typehandlers-jsr310' dependency.
Deleteorg.mybatis
mybatis-typehandlers-jsr310
1.0.0
Hi There,
ReplyDeleteI am trying to use spring boot with mybatis 3.4.0 and deploy the 'WAR' file to IBM WAS 8.5.5.9.
When I start the app I get the following error for all classes in mybatis 3.4.0 jar file:
00000099 SystemOut O 2016-06-02 19:29:29.528 WARN 16489 --- [ Default : 4] com.ibm.ws.ecs : unable to open input
stream for resource org/apache/ibatis/javassist/util/proxy/SerializedProxy.class in archive WEB-INF/lib/mybatis-3.3.1.jar
java.lang.RuntimeException: null
at org.objectweb.asm.MethodVisitor.visitParameter(Unknown Source)
at org.objectweb.asm.ClassReader.b(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at com.ibm.ws.ecs.internal.scan.impl.ClassScanner.scanInputStream(ClassScanner.java:149)
It works fine in Jetty Server but IBM WAS 8.5.5.9 (which is JDK 1.8) I see the error s as above.
ReplyDeleteIS there a way to resolve the above issue?
when using 3.4.0 i see this:
ReplyDelete[2/06/16 14:24:32:172 NZST] 00000077 wtp W org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.WARFileAnnotationsDetector locateAnnotations Scan failure for [ o
rg/apache/ibatis/javassist/util/proxy/SerializedProxy.class ] in [ WEB-INF/lib/mybatis-3.4.0.jar ]: [ null ]
You can find a workaroud here https://groups.google.com/forum/#!topic/mybatis-user/ZhI4cPe7cq8
DeleteAnyway I would like to ask you to open an issue to IBM and let us know about it here:https://github.com/mybatis/mybatis-3/issues/706
And/Or in in shade's tracker: https://issues.apache.org/jira/browse/MSHADE-226
Thanks in advance!!!
In our present implementation the application is using a 3rd party cache. In order to check the performance of this interaction with the cache -- is it possible to implementation that will respond with unique data sets.
ReplyDelete