What version of the MyBatis are you using?
MyBatis-Spring 1.0.0-RC2
Please describe the problem. Unit tests are best!
Right now MyBatis-Spring requires that your beans are annotated with @Mapper
proprietary annotation.
@Mapper annotation is proprietary so if you change or reuse your code in
different containers (Spring -> Guice i.e.) it won´t work of you will need to
change it or let mybatis-spring jar in your classpath forever.
What is the expected output? What do you see instead?
There are some annotations out there like @Component from Spring or @Named from
JSR-330 or @ManagedBean from JEE 6 that should able to be used.
It would be better that MyBatis spring lets you:
- search for all mappers in a package tree
- search for all mappers extending a base interface class
- search for all mappers annotated with a configurable annotation
Then it should also be able to get bean name from @Component or JSR-330 @Named
Please provide any additional information below.
Already fixed in trunk by Hunter.
This change will require changes in user code based on RC2.
Original issue reported on code.google.com by eduardo.macarron on 16 Nov 2010 at 7:06
Original issue reported on code.google.com by
eduardo.macarron
on 16 Nov 2010 at 7:06