首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

JPetStore 5.0 上载及部署

2012-10-19 
JPetStore 5.0 下载及部署JPetStore是java入门的经典项目,它与.Net PetShop之争正是Java与.Net之争的集中

JPetStore 5.0 下载及部署

JPetStore是java入门的经典项目,它与.Net PetShop之争正是Java与.Net之争的集中体现。

JPetStore 5.0的下载地址:
http://apache.justdn.org/ibatis/binaries/ibatis.java/JPetStore-5.0.zip
下载完后,将其解压,在build\wars下有一个jpetstore.war,将其复制到tomcat的webapps下,或到jboss的deploy下,启动web服务器,即可以在浏览器中输入如下地址访问:
http://localhost:8080/jpetstore/
或者
http://localhost:8080/jpetstore/shop/index.shtml

除了build目录外,src文件夹存放到java源程序,web存放jsp、配置文件等web文件,lib存放一些包,doc存放一些简单的说明信息。

其中src\ddl文件夹中还保存了hsql、mssql、mysql、oracle和postgres等数据库的安装和卸载脚本。如果你不想使用默认的hsql数据库,你还可以通过脚本安装到别的数据库。

?

http://hi.baidu.com/ffcheng1987/blog/item/71fe73065869817803088192.html

?

?

?

?

?

 JPetStore 5.0 应用系统采用三层结构已经被越来越多的开发者所接受,然而在实际开发中,有不少项目由于各种各样的原因,设计的三层结构并未显示出自己的优势,反而增加了系统的复杂性,降低了系统的可维护性。在这些项目中,项目的设计者是否真正理解了三层结构,项目的执行者是否能够按照设计者的思路开发出系统,是三层结构能否显示其优势的重要因素。

  JPetStore 5.0 采用了一个非常清晰的三层结构,深入研究JPetStore 5.0的结构,对设计者和开发者都大有裨益。

  从JPetStore 5.0的包就可以清晰地看出各层:

  表现层:com.ibatis.jpetstore.presentation

  业务层:com.ibatis.jpetstore.service

  持久层:com.ibatis.jpetstore.persistence

  此外还有领模型:com.ibatis.jpetstore.domain

  在经典的三层结构中,表现层调用业务层,业务层调用持久层。表现层与Struts、veource_url', source_url); pre.writeAttribute('pre_index', index); pre.writeAttribute('title', 'JPetStore 5.0 下载及部署'); }); $$('#main .blog_comment > div').each(function(comment){// comment var post_id = comment.id.substr(2); $$("#"+comment.id+" pre[name=code]").each(function(pre, index){ var location = window.location; source_url = location.protocol + "//" + location.host + location.pathname + location.search; source_url += "#" + comment.id; pre.writeAttribute('codeable_id', post_id); pre.writeAttribute('codeable_type', "BlogComment"); pre.writeAttribute('source_url', source_url); pre.writeAttribute('pre_index', index); pre.writeAttribute('title', 'JPetStore 5.0 下载及部署'); }); }); code_favorites_init(); fix_image_size($$('div.blog_content img'), 700); function quote_comment(id) { new Ajax.Request('/editor/quote', { parameters: {'id':id, 'type':'BlogComment'}, onSuccess:function(response){editor.bbcode_editor.textarea.insertAfterSelection(response.responseText); Element.scrollTo(editor.bbcode_editor.textarea.element);} }); } new WeiboShare({share_buttons: $('share_weibo'), img_scope: $('blog_content')});

热点排行