emacarron / mybatis

Automatically exported from code.google.com/p/mybatis
0 stars 0 forks source link

[mybatis-spring] Some samples of code to show the 3 ways to integrate with spring #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hope this is helpful for the documentation.

I just modified the sample on SVN to show 3 ways of implementing a DAO.
- Using SqlSessionDaoSupport
- Using directly MyBatis API (SqlSession)
- Injecting Mappers (in fact this means that there is no DAO implementation)

Original issue reported on code.google.com by eduardo.macarron on 13 Sep 2010 at 3:39

Attachments:

GoogleCodeExporter commented 9 years ago
patch applied, see r2331
thanks Edu

Original comment by simone.t...@gmail.com on 13 Sep 2010 at 4:19

GoogleCodeExporter commented 9 years ago
Refactor to make all 3 cases work in test.

Original comment by eduardo.macarron on 13 Sep 2010 at 8:41

Attachments:

GoogleCodeExporter commented 9 years ago
I have seen I have left some useless lines in context.xml. Please remove it if 
possible when you merge the changes. thanks again!

    <!-- the test bean -->
    <bean class="sample.MyBatisSampleTest">
        <property name="fooService1" ref="fooService1" />
        <property name="fooService2" ref="fooService2" />
        <property name="fooService3" ref="fooService3" />
    </bean>

Original comment by eduardo.macarron on 13 Sep 2010 at 9:35

GoogleCodeExporter commented 9 years ago
I'm not able to apply it since you generated it through Eclipse, can you 
regenerate please from shell using

---
mybatis-spring> svn diff . > issue100.patch
---

many thanks in advance!

Original comment by simone.t...@gmail.com on 14 Sep 2010 at 5:45

GoogleCodeExporter commented 9 years ago
Errr. I must confess that this one is done with tortoiseSVN :P But it should 
work! :)

Original comment by eduardo.macarron on 14 Sep 2010 at 8:30

Attachments:

GoogleCodeExporter commented 9 years ago
Patch sucessfully applied, thanks Eduardo :)

Original comment by simone.t...@gmail.com on 15 Sep 2010 at 7:39

GoogleCodeExporter commented 9 years ago

Original comment by eduardo.macarron on 1 Jan 2011 at 5:27