
J2EE
longcxm1
这个作者很懒,什么都没留下…
展开
-
ibatis简单使用
iBATIS与和hibernate不同,它不是直接把类映射为数据库表或者说把类的字段映射为数据库列,而是把SQL语句的参数与结果(也即输入和输出)映射为类 一、 SqlMapConfig.xml是ibatis最重要的配置文件,主要定义数据源和映射文件的相关信息,如下所示: <?xml version="1.0" encoding="UTF-8"...原创 2012-11-21 09:34:06 · 113 阅读 · 0 评论 -
ibatis与和hibernate
Hibernate功能强大,数据库无关性好,O/R映射能力强,如果你对Hibernate相当精通,而且对Hibernate进行了适当的封装,那么你的项目整个持久层代码会相当简单,需要写的代码很少,开发速度很快,非常爽。 Hibernate的缺点就是学习门槛不低,要精通门槛更高,而且怎么设计O/R映射,在性能和对象模型之间如何权衡取得平衡,以及怎样用好Hibern...原创 2012-11-21 09:35:50 · 92 阅读 · 0 评论 -
HelloWrod For struts2
Create a "Hello World" struts2 example, you need to do four things: 1. Create a class to store the welcome message (the model)2. Create a server page to present the message (the view)3. Cre...原创 2012-11-22 23:10:29 · 206 阅读 · 0 评论 -
struts2的执行流程
The container receives from the web server a request for the resource hello.action. According to the settings loaded from the web.xml, the container finds that all requests are being routed to org.a...原创 2012-11-22 23:43:22 · 116 阅读 · 0 评论 -
ibatis的动态sql
<select id="getUsers"parameterClass="user"resultMap="get-user-result"> selectid,name,sexfrom t_user<dynamic prepend="WHERE"> <isNotEmpty prepend="AND&quo原创 2012-11-26 16:52:09 · 185 阅读 · 0 评论 -
Spring整合struts2
spring整合struts2的步骤: (其实很简单,只需要把action的类名换成spring的bean名称即可)1.在web.xml文件中添加spring的ContextLoaderListener监听器;2.把acion的class属性改成spring的bean名称;3.添加相关的依赖包,即可;...原创 2013-05-09 11:11:58 · 190 阅读 · 0 评论 -
spring概述
一、Spring概述 The Spring Framework is a lightweight solution and a potential one-stop-shop for building your enterprise-ready applications.However, Spring is modular, allowing you to use only thos...原创 2012-12-10 23:22:17 · 126 阅读 · 0 评论 -
注入的方式
一、依赖注入概述 Dependency injection (DI) is a process whereby objects define their dependencies, that is, the other objects they work with,The container then injects those dependencies when it crea...原创 2012-12-10 23:59:23 · 181 阅读 · 0 评论