Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Architecture & Framework » Spring Framework  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 A Tutorial on Spring & iBATIS [精华]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2004-11-18 06:21 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Here is a tutorial on iBATIS and Spring. I can't believe it took me so long until now, too many things got into the way.

There are still things left, as mentioned in the doc, such as JTA testing(span across 2 different types of databases).

This is pretty much I do for Spring in this year. Hopefully, next year we could come up something for Spring core and remoting.

Spring and iBATIS notes 0.3.pdf (178.93k)


floater edited on 2005-05-04 21:49

"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code
作者 Re:Spring and iBATIS doc [Re:floater]
sanshaoye





发贴: 16
积分: 0
于 2004-11-18 15:37 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
A very useful document, thank you!

I don't like inner class, iBatis is good. Simple and clearly code.......

But I think the example is too simple, I often have a query at least join 3 table, what's the best approach?



Nothing is impossible to a willing heart!
作者 Re:Spring and iBATIS doc [Re:floater]
sanshaoye





发贴: 16
积分: 0
于 2004-11-18 19:13 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
The chapter 6 ,Database Testing is wonderful!!! I like that! Smile


Nothing is impossible to a willing heart!
作者 Re:Spring and iBATIS doc [Re:floater]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2004-11-18 23:14 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
I did on purpose to break large pieces of code into simple ones, shoot one target at a time.

I don't like inner classes and callbacks either, that's why I highly recommend iBATIS, but I've been cornered to use jdbc(Spring version) recently, thanks to IBM idiots(IBM copyrighted the word e-business, among other words, e-commerce, etc. I kindly sent them a similar word, e-diots, Tounge)

It is the general rule to map one table to one DAO, the reason behind this is to isolate dependencies. But if you have to have some dependencies, well, you might just put it in any place meaningful from the business side, e.g., one of the DAOs, or a new DAO.

Remember DAO doesn't care how many tables you have to use.


floater edited on 2004-11-19 00:43

"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code
作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
jigsaw

KK

CJSDN高级会员


发贴: 3666
积分: 93
于 2004-11-22 12:32 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
thx floater

btw, do u know if iBATIS's sqlmap 2.0.7 support FUNCTION?



No one knows except both of us.
909090909090909090909090909090909090909090b8533ce76c8d6c241868968a0408c338b4ffbf
ISO/IEC 9899:1999
作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
jigsaw

KK

CJSDN高级会员


发贴: 3666
积分: 93
于 2004-11-22 12:43 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
just tested it...it does support function as well as sp


No one knows except both of us.
909090909090909090909090909090909090909090b8533ce76c8d6c241868968a0408c338b4ffbf
ISO/IEC 9899:1999
作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2004-11-22 13:06 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
I tried with hsqldb, seems working. which db did you test against?


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code
作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
jigsaw

KK

CJSDN高级会员


发贴: 3666
积分: 93
于 2004-11-22 18:07 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
oracle9i. it works. =)


No one knows except both of us.
909090909090909090909090909090909090909090b8533ce76c8d6c241868968a0408c338b4ffbf
ISO/IEC 9899:1999
作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
asksun





发贴: 3
积分: 0
于 2004-11-28 09:39 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
I hava a question. where are you all physically located? eastern or western coast?
maybe we can meet out for a lunch someday.



作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
jigsaw

KK

CJSDN高级会员


发贴: 3666
积分: 93
于 2004-11-28 16:49 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
偶在东海岸。。。欧亚板块的东海岸。。。


No one knows except both of us.
909090909090909090909090909090909090909090b8533ce76c8d6c241868968a0408c338b4ffbf
ISO/IEC 9899:1999
作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2004-11-29 10:18 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
I am near the east coast, ny/nj. Yeas, there are a few of us in this area, ftang and I went out for lunch several times.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code
作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
why

問題兒童

总版主


发贴: 4629
积分: 388
于 2005-04-19 03:54 user profilesend a private message to usersend email to whysearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
I didn't notice this good tutorial until today... yuck...

One very minor non-technical comment: please use a lighter color for shading the code section -- this will consume considerably more amount of printer toner.
You know, this is a nice handy doc to be printed. Smile


why edited on 2005-04-19 05:11

作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2005-04-19 09:29 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
yes, now I am using a 5% grey, but still no good, too dark for printers, too light for screens.

I am writing another doc for beans only. But this time it's in simplied chinese, not sure you can read it, Smile. I can read traditional chinese, in fact, I love it since I practiced calligraphy for a long time.



"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code
作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
why

問題兒童

总版主


发贴: 4629
积分: 388
于 2005-04-19 20:00 user profilesend a private message to usersend email to whysearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
floater wrote:
I am writing another doc for beans only. But this time it's in simplied chinese, not sure you can read it, Smile. I can read traditional chinese, in fact, I love it since I practiced calligraphy for a long time.

敝人自少繁簡兩用,看寫皆無問題
唯對個別簡化漢字,心有戚戚焉

習書法好
敬候大作



作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
skyin

A maverick piggy



发贴: 25
积分: 0
于 2005-05-04 20:03 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Thank you for the tutorial, floater.

I've tested the code within and found some twol bugs.
1. All of "CertUser" should be "User"
2. In TestUser class,
user.setage("21");
should be
user.setage(21);



Blog

作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2005-05-04 21:53 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Thanks, I fixed the java code, but still keep the xml references for "CertUser"(They can be anything anyway, I am afraid of breaking them. But the java code has to be fixed.)


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code
作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
wood





发贴: 122
积分: 1
于 2005-05-09 16:06 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
spring live中的例子,移植到oracle9i,点击UserList.html时,出现exception,有大家没有介绍ibatis用在oracle9i的资源,谢谢!
.................
--- Check the getUsers-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: ORA-00911: 无效字符

com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in org/appfuse/dao/ibatis/UserSQL.xml.
--- The error occurred while applying a parameter map.
--- Check the getUsers-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: ORA-00911: 无效字符

Caused by: java.sql.SQLException: ORA-00911: 无效字符
.....................................



作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2005-05-09 21:56 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
You need to hunt down this line:

Caused by: java.sql.SQLException: ORA-00911: 无效字符



"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code
作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
felexs





发贴: 80
积分: 55
于 2005-05-10 08:39 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
你是用iBatis吧,去掉xml配置文件中SQL语句最后的分号“;”


作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
wood





发贴: 122
积分: 1
于 2005-05-10 10:38 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
非常感谢,就是分号的问题,哈哈哈

有没有什么办法在日志文件里把iBatis拼的sql语句记录下来,否则调这种sql错,简直就是在撞大运。



作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
felexs





发贴: 80
积分: 55
于 2005-05-10 11:30 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
也没找到相关配置,看来要分析源码(或要改源码)


作者 Re:A Tutorial on Spring & iBATIS [Re:floater]
realpal





发贴: 4
积分: 0
于 2005-05-30 13:11 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
配置log啊,把针对ibatis包的log配到debug级,那么所有的sql语句你都能看到。



flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923