??xml version="1.0" encoding="utf-8" standalone="yes"?>99久久99久久免费精品蜜臀,国产精品久久激情,欧美偷拍视频http://www.aygfsteel.com/pesome/category/2548.htmlzh-cnTue, 27 Feb 2007 10:54:32 GMTTue, 27 Feb 2007 10:54:32 GMT60目中spring分层开发的ȝhttp://www.aygfsteel.com/pesome/archive/2006/01/16/28182.htmlpesomepesomeMon, 16 Jan 2006 05:57:00 GMThttp://www.aygfsteel.com/pesome/archive/2006/01/16/28182.htmlhttp://www.aygfsteel.com/pesome/comments/28182.htmlhttp://www.aygfsteel.com/pesome/archive/2006/01/16/28182.html#Feedback10http://www.aygfsteel.com/pesome/comments/commentRss/28182.htmlhttp://www.aygfsteel.com/pesome/services/trackbacks/28182.html对spring框架和开发模式进行了验证。大家有什么问题或好的Q请回复Q大家一赯论!

一?/SPAN> 目目标及完成情?/SPAN>

目标

完成情况

技术验证和推广

完成较好?SPAN lang=EN-US>

1Q?SPAN style="FONT: 7pt 'Times New Roman'"> 共有7人实际参与项目开发,我们引入maven2作ؓ构徏工具Q?SPAN lang=EN-US>eclipse作ؓide环境。大安能在很短的时间初始化目Qƈ快速掌握各自需要的技术(?SPAN lang=EN-US>springQ?SPAN lang=EN-US>spring mvc{)q行开发?SPAN lang=EN-US>

2Q?SPAN style="FONT: 7pt 'Times New Roman'"> 对分层开发的模式也进行了探讨Q证明它是可行的Q可以各层ƈ行开发,提高开发效率;而通过分层可以隔离x点,使得各层开发h员可以只x本层相关技术和接口Q减d发h员负担,提高效率?SPAN lang=EN-US>

3Q?SPAN style="FONT: 7pt 'Times New Roman'"> 在项目活动中到一些技术难点,我们解x案文档化Q然后项目内׃nQ这栯在碰到同样问题时快速解冟뀂现在还是碰到问题才解决Q以后需要徏立预研机Ӟ较早发现可能出现的难点,早解决Q避免对目q展产生影响?SPAN lang=EN-US>

4Q?SPAN style="FONT: 7pt 'Times New Roman'"> q_q处于徏ND,寚w目的支持q不够,需要Ş成一些通用的组件?SPAN lang=EN-US>

q程和管理实?SPAN lang=EN-US>

有待提高?SPAN lang=EN-US>

1Q?SPAN style="FONT: 7pt 'Times New Roman'"> 1.0版已发布Q目前开?SPAN lang=EN-US>1?SPAN lang=EN-US>1版,完善分页功能和采用更好的验证方式。由于对规范开发的目周期估计不Q加上管理上的一些问题,D目有所延期Q需要对实际的项目开发进行量化分析,立比较准确的h员和旉计划?SPAN lang=EN-US>

2Q?SPAN style="FONT: 7pt 'Times New Roman'"> UC文档规范和编码规范等的引入,为项目提供了较好的支持?SPAN lang=EN-US>

3Q?SPAN style="FONT: 7pt 'Times New Roman'"> 在实施中比较~Z必要的文档支持,如设计文档等Q同时各层的接口定义也出现较多问题,D一些开发瓶颈的出现Q这都需要在正式q代中改q?SPAN lang=EN-US>

pȝ功能

完成较好?SPAN lang=EN-US>

1Q?SPAN style="FONT: 7pt 'Times New Roman'"> 完成?SPAN lang=EN-US>UC文档定的功能点Q页面美观,使用方便Q能l用戯好的面体验?B style="mso-bidi-font-weight: normal">

2Q?SPAN style="FONT: 7pt 'Times New Roman'"> 采用较好的面向对象设计,能提供一定的可重用性和扩展性?B style="mso-bidi-font-weight: normal">

二、展现层ȝ

l验与教?/FONT>

1.         SpringMVC是一个简z、标准的MVC实现Q结构清晎ͼ功能强大Q主要体现在Ҏ?/SPAN>WEB开发中可能遇到的各U常见问题的解决ҎQ,有一定学习曲U,但是有其?/SPAN>MVC框架基础的开发h员可以较快上手;

2.         Ҏ业务功能早定接口Q接口由展现层确定,׃务层实现Q?/SPAN>

3.         合理选择Controller可以减少开发工作量Q前提是充分理解每种Controller的处理机制及其回调方法细节,Controller的编写更多的_֊主要花在校验、出错处理上Q?/SPAN>

4.         面工作量很大,特别是需要比较复?/SPAN>javascript的页面;

5.         UI的流转设计等对于Controller的编写和业务层的接口有着很大的媄响,应尽早明,否则会生较大的q工Q?/SPAN>

6.         展现层开发可以与业务层同步进行,推荐定接口后,q写业务层接口?/SPAN>mock实现Q放在展现层?/SPAN>test包内Q同时写单独的测试用spring配置文gQ?/SPAN>

待解决问?/FONT>

1.         Controller是否应写test caseQ本ơ开发未做;

2.         如何减少校验的工作量Q对于有业务逻辑的服务端校验如何实现Q是否需要采用一?/SPAN>validator框架Q如sun?/SPAN>JEF?/SPAN>validatorlgQ目前我们进行了研究Q通过使用commons validatorlg能够较方便的实现validatorQ?/SPAN>

三、业务层ȝ

l验与教训:

1.         SpringQ?/SPAN>iBatis的应用还是很成功的,学习曲线比较qxQ好的框架好掌握Q?/SPAN>

2.         比较重视试Q编写很多测试案例,qJ?/SPAN>mavenq行所有测试,使得问题能够及早发现Q保证了各层能够快速成功集?/SPAN>

3.         对于很多问题都需要经q各层间的讨论来定Q?/SPAN>

4.         接口由展现层定义Q由业务层实玎ͼ

5.         持久层数据模型和领域模型是有区别的,但简单的情况下可以合二ؓ一Q?/SPAN>

6.         Façade模式q是很有价值的Q?/SPAN>

7.         一些开源Y件的使用需要比较小心,?/SPAN>iBatis?/SPAN>null的问题等Q如果处理不当会p较多的h力物力,需要技术较强的人对开源Y件花费一定时间进行源码的研IӞ才能扑և较好的解x案;

8.         认识到设计的重要性,需要对前置、后|条件等q行分析Q?/SPAN>

9.         数据cd分析单,造成数据库设计对业务层生不良媄响;

待解决问题:

1.         沟通不够,需要徏立沟通渠道,是否可以有专门的场合和时间讨论项目中的进度和问题Q?/SPAN>

2.         计划不明,对于要完成哪些功能,完成C么程度,没有明确的定义,需要设|里E碑目标。在正式q代开始前Q要明确每次q代的Q务和目标Q需要结合业务需求进行计划;

四、持久层ȝ

l验与教训:

1Q?SPAN style="FONT: 7pt 'Times New Roman'">  通过代码生成工具Q能够大大提高开发效率;

2Q?SPAN style="FONT: 7pt 'Times New Roman'">  工具使用者要求对ibatis?/SPAN>sql比较了解Q?/SPAN>

3Q?SPAN style="FONT: 7pt 'Times New Roman'">  在用过E中对工兯行了完善Q这Ҏ式用工h供了保证Q?/SPAN>

4Q?SPAN style="FONT: 7pt 'Times New Roman'">  与业务层的接口,应该׃务层定Q由持久层实玎ͼ而不是由持久层决定;

待解决问题:

1Q?SPAN style="FONT: 7pt 'Times New Roman'">  持久层的试该如何进行,才能真的有用Q?/SPAN>

2Q?SPAN style="FONT: 7pt 'Times New Roman'">  一些通用功能如分代码生成,q在开发中Q?/SPAN>

 



pesome 2006-01-16 13:57 发表评论
]]>
Spring+hibernate实战Q二Q?/title><link>http://www.aygfsteel.com/pesome/archive/2005/11/07/18591.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Mon, 07 Nov 2005 08:02:00 GMT</pubDate><guid>http://www.aygfsteel.com/pesome/archive/2005/11/07/18591.html</guid><wfw:comment>http://www.aygfsteel.com/pesome/comments/18591.html</wfw:comment><comments>http://www.aygfsteel.com/pesome/archive/2005/11/07/18591.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/pesome/comments/commentRss/18591.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/pesome/services/trackbacks/18591.html</trackback:ping><description><![CDATA[     摘要: 目很小Q主体部分也完成的差不多了,但麻雀虽小Q五脏具全,我在其中用到了spring的IoC和transaction理Q也用到了简单的AOP功能Q同时用了spring mvcQ下面我对它们做一些ȝQ也跟和我一样刚刚踏入spring大门的兄弟们探讨探讨Q?Q一Qspring IoC探讨 先还是谈谈spring IoC的用。IoC也就是控制反转,即由容器来调用你的代码,而你不用M用容器的...  <a href='http://www.aygfsteel.com/pesome/archive/2005/11/07/18591.html'>阅读全文</a><img src ="http://www.aygfsteel.com/pesome/aggbug/18591.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/pesome/" target="_blank">pesome</a> 2005-11-07 16:02 <a href="http://www.aygfsteel.com/pesome/archive/2005/11/07/18591.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Spring+hibernate实战Q一Q?/title><link>http://www.aygfsteel.com/pesome/archive/2005/10/31/17598.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Mon, 31 Oct 2005 13:48:00 GMT</pubDate><guid>http://www.aygfsteel.com/pesome/archive/2005/10/31/17598.html</guid><wfw:comment>http://www.aygfsteel.com/pesome/comments/17598.html</wfw:comment><comments>http://www.aygfsteel.com/pesome/archive/2005/10/31/17598.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.aygfsteel.com/pesome/comments/commentRss/17598.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/pesome/services/trackbacks/17598.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">今天忙了一天,收获不小。到公司接到个小目Q需求很单,旉也很宽松Q我想?/SPAN><SPAN lang=EN-US>spring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN><SPAN lang=EN-US>hibernate</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来做Q其实有Ҏ鸡用牛刀的味道,但我觉得能通过实践来学?/SPAN><SPAN lang=EN-US>spring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>hibernate</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q也q是不错的?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US>spring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>hibernate</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我也是刚学,各看了本书,然后搞了?/SPAN><SPAN lang=EN-US>spring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>sample</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q就是那?/SPAN><SPAN lang=EN-US>jpetstore</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>petclinic</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q一个是?/SPAN><SPAN lang=EN-US>ibatis</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q一个用</SPAN><SPAN lang=EN-US>hibernate</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>persistence</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">层。同时有一个刚q公司的着我做Q我也就得先把项目初始化好,写好配置文gQ分好包和层ơ结构,然后?/SPAN><SPAN lang=EN-US>cvs</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上。既然用</SPAN><SPAN lang=EN-US>spring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN><SPAN lang=EN-US>hibernate</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q配|文件肯定是很多的,我基本是参照</SPAN><SPAN lang=EN-US>petclinic</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q分?/SPAN><SPAN lang=EN-US>dao, dao.hibernate, model, model.logic, service, web</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q几个包Q配|文件定义了</SPAN><SPAN lang=EN-US>applicationContext.xml</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN><SPAN lang=EN-US>app-servlet.xml(</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我用</SPAN><SPAN lang=EN-US>spring mvc) , log4j.properties</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN><SPAN lang=EN-US>jdbc.properties, mail.properties</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q说?/SPAN><SPAN lang=EN-US>spring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的配|文Ӟ其实也不复杂Q搞懂了它的</SPAN><SPAN lang=EN-US>IoC</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN><SPAN lang=EN-US>DI</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q和</SPAN><SPAN lang=EN-US>AOP</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">很Ҏ配了Q层ơ定义清楚,在头脑中对谁</SPAN><SPAN lang=EN-US>ref</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">谁有概念Q基本就不大会配错了。错了也没关p,它的</SPAN><SPAN lang=EN-US>log</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">功能强大Q定义好</SPAN><SPAN lang=EN-US>log4j</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q出了什么错都能有详l的记录。我?/SPAN><SPAN lang=EN-US>spring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>sample</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">时就是把q个配置ҎQ那个删掉,自己写个c,替换它的。。。。。。这样很快就对它的配|文件有了深ȝ理解。这ơ算是我W一个正式用</SPAN><SPAN lang=EN-US>spring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的项目,但因为前面在理论上和零星的实践中对它有了较深的认识,也就大大降低了项目的风险Q技术预研真的很重要啊!Q?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">虽然是小目Q但也得规范一下,定好目计划Q统一大家使用的工具和环境Q简单交代编E的注意事项Q如代码规范Q?/SPAN><SPAN lang=EN-US>cvs</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的用,多写</SPAN><SPAN lang=EN-US>test</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">cȝ。我们采?/SPAN><SPAN lang=EN-US>eclipse3.1+ myeclipse+tomcat5+mysql</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作ؓ各自的开发和单元试环境Q上U?/SPAN><SPAN lang=EN-US>websphere5+db2</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。我是要求先?/SPAN><SPAN lang=EN-US>mysql</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上能跑,然后能方便的q移?/SPAN><SPAN lang=EN-US>db2</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上的Q这h便进行单元测试,也能在事实上与数据库解耦合Q用</SPAN><SPAN lang=EN-US>hibernate</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">很容易做到这一炏V?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">但要能顺利的上线?/SPAN><SPAN lang=EN-US>websphere5</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q我没什么把握了Q毕竟它q是使用</SPAN><SPAN lang=EN-US>ibm </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>jdk1.3</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q而且很多东西?/SPAN><SPAN lang=EN-US>tomcat</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不同Q更会不会有什?/SPAN><SPAN lang=EN-US>lib</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">冲突{问题。我先把兼容性测试放在了开发的前面Q否则在</SPAN><SPAN lang=EN-US>tomcat</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上开发好了,</SPAN><SPAN lang=EN-US>websphere</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不支持或出现难以解决的问题,麻烦了Q严重的可能要推倒重来。因为没在实际项目中使用q?/SPAN><SPAN lang=EN-US>spring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q周围又没什么h可问Q我毕业一q多Q没有高手指|全靠自学和实际项目中领悟Q,所以有q些疑问也是正常的。不如何,先把目?/SPAN><SPAN lang=EN-US>tomcat</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上跑h再说。改了一通配|文Ӟ配好</SPAN><SPAN lang=EN-US>tomcat</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的数据源Q往</SPAN><SPAN lang=EN-US>mysql</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">加一个最单的表(</SPAN><SPAN lang=EN-US>id</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个字D)Q写?/SPAN><SPAN lang=EN-US>2</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">张最单的</SPAN><SPAN lang=EN-US>jsp</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q测?/SPAN><SPAN lang=EN-US>spring mvc</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">multiaction</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">?/SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q,一?/SPAN><SPAN lang=EN-US>jsp</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">昄从数据库获得?/SPAN><SPAN lang=EN-US>id</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。开启和关闭几次</SPAN><SPAN lang=EN-US>tomcat</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q我比较_心大意Q配错好几处Q,</SPAN><SPAN lang=EN-US>id</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">p在页面上昄了?/SPAN><SPAN lang=EN-US>Tomcat</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上基本配|完成,q也忙了?/SPAN><SPAN lang=EN-US>3</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>4</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个小时?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">然后是做兼Ҏ测试了。我们有?/SPAN><SPAN lang=EN-US>websphere</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的测试环境,先把目</SPAN><SPAN lang=EN-US>deploy</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">到它上面。测试环境没?/SPAN><SPAN lang=EN-US>ND</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q我?/SPAN><SPAN lang=EN-US>deploy</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>server1</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上,q样能重启应用?/SPAN><SPAN lang=EN-US>Deploy</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">完成Q页面都Z来,</SPAN><SPAN lang=EN-US>500</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">错,应用没h。先看日志,哇!一堆错。分析日志,好像是先装蝲?/SPAN><SPAN lang=EN-US>DispatcherServlet, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">然后才是</SPAN><SPAN lang=EN-US>ContextLoaderServlet</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q当然出问题了,不过臛_说明它找C</SPAN><SPAN lang=EN-US>lib</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下的</SPAN><SPAN lang=EN-US>spring.jar</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也能</SPAN><SPAN lang=EN-US>work</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。我使用?/SPAN><SPAN lang=EN-US>Listener</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">而不?/SPAN><SPAN lang=EN-US>Servlet</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>load context</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q估计是q个原因D的,</SPAN><SPAN lang=EN-US>tomcat</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工作正常Q?/SPAN><SPAN lang=EN-US>websphere</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>Listener</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">׃保证先启动了。于是改成?/SPAN><SPAN lang=EN-US>Servlet</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN><SPAN lang=EN-US>tomcat</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">试通过Q我改q的</SPAN><SPAN lang=EN-US>web.xml</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">覆盖服务?/SPAN><SPAN lang=EN-US>(</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q里要覆?/SPAN><SPAN lang=EN-US>2</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个地方,一个是应用下的Q还有一?/SPAN><SPAN lang=EN-US>config/cells?.</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下的</SPAN><SPAN lang=EN-US>)</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN><SPAN lang=EN-US><SPAN style="mso-tab-count: 1"> </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">重启应用Q再看日志,q是错。不q这ơ是先启?/SPAN><SPAN lang=EN-US>ContextLoaderServlet</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">了,但一上来错了,报错Q?/SPAN><SPAN lang=EN-US>javax.naming.NamingException: Attempted to use a 4.0 DataSource from a 2.3 (or higher) servlet</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。这不是</SPAN><SPAN lang=EN-US>spring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的问题,呵呵Q我用的数据?/SPAN><SPAN lang=EN-US>V4</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q结果用?/SPAN><SPAN lang=EN-US>j2ee2.3</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q再?/SPAN><SPAN lang=EN-US>web.xml</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q头上改成用</SPAN><SPAN lang=EN-US>j2ee2.2</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q再覆盖Q再启应用。这ơ首出来了Q看日志Q一切正常。呵呵!没那么多问题嘛,</SPAN><SPAN lang=EN-US>jdk1.3</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">照样跑最新的</SPAN><SPAN lang=EN-US>spring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>hibernate</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">今天从零开始把</SPAN><SPAN lang=EN-US>spring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>hibernate</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">跑了hQ也是一ơ不错的实战Q就作ؓ</SPAN><SPAN lang=EN-US>spring+hibernate</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实战的第一吧Q接下来几天Q我在项目中的体会也会记录下来,当成一个一个系列吧?/SPAN></P><img src ="http://www.aygfsteel.com/pesome/aggbug/17598.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/pesome/" target="_blank">pesome</a> 2005-10-31 21:48 <a href="http://www.aygfsteel.com/pesome/archive/2005/10/31/17598.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>自己实现ORMhttp://www.aygfsteel.com/pesome/archive/2005/10/25/16743.htmlpesomepesomeTue, 25 Oct 2005 05:55:00 GMThttp://www.aygfsteel.com/pesome/archive/2005/10/25/16743.htmlhttp://www.aygfsteel.com/pesome/comments/16743.htmlhttp://www.aygfsteel.com/pesome/archive/2005/10/25/16743.html#Feedback2http://www.aygfsteel.com/pesome/comments/commentRss/16743.htmlhttp://www.aygfsteel.com/pesome/services/trackbacks/16743.html阅读全文

pesome 2005-10-25 13:55 发表评论
]]>
վ֩ģ壺 | | ˫| | е| | | ĩ| ݳ| | ɽ| ɽ| | | ɽ| | ̨| ɽ| | ʩ| | | | | | | | | ν| ͷ| µ| | | ¤| | | | | | | ¡|