- 浏览: 2286887 次
- 性别:
- 来自: 成都
文章分类
- 全部博客 (357)
- J2EE (49)
- JavaScript (40)
- Spring (19)
- Struts (5)
- CSS (8)
- Hibernate (16)
- Java (67)
- DWR (4)
- JSON (3)
- XFIRE (1)
- Tomcat (1)
- Ant (2)
- 设计模式 (2)
- 经典收藏 (2)
- JSP (10)
- Linux (0)
- WebLogic (11)
- myeclipse (13)
- Buffalo (4)
- 文件上传相关 (1)
- oracle (33)
- html (6)
- JSTL (3)
- SVN (2)
- GIT (1)
- 孙卫琴(Java网络编程精解) (1)
- DOM4J (2)
- Swing (1)
- AJAX (1)
- Eclipse (5)
- 日志组件 (3)
- PowerDesigner (1)
- Jquery (22)
- IT技术开发相关网址 (1)
- Nutz (1)
- 其它 (1)
- Velocity (3)
- WebService (1)
- MySql (2)
- Android (1)
- Maven (2)
- Quartz (11)
- Lucene (1)
- springsource (1)
- Junit (1)
- Activiti (0)
最新评论
-
yzlseu:
拼凑,没有营养
Activiti进阶—分配组任务 -
zhangsenhao:
非常赞!代码很清楚
SpringMVC3.0+MyIbatis3.0(分页示例) -
xiamw2000:
分页写得不对,应该是 : order by ${orderNa ...
SpringMVC3.0+MyIbatis3.0(分页示例) -
sheertewtw:
...
SpringMVC:上传与下载 -
kingtoon:
...
XSS之xssprotect
一 运行环境: XP3+Myeclipse6.6+Tomcat7
二 项目框架版本号:Struts2 version: 2.2.1.1,Spring version: 3.1,Hibernate version:3.6,在Hibernate下有个jar为:javassist-3.12.0.GA.jar,在这个示例中用的是:javassist-3.7.ga.jar,这二个在这个示例中都可以用,没问题,一般原则用新版本的
项目所用jar文件如下图
三 具体实现如下:
1 配置文件:
Web.xml
Struts2.xml文件如下:
applicationContext.xml配置文件如下:
jdbc.properties属性文件如下:
log4j.properties属性文件如下:
2 Java代码如下:
A WEB层:
BaseAction Code:
UserAction Code:
Service层:
UserService Code:
UserServiceImpl Code:
Entity层:
User Code:
DAO层:
UserDAO Code:
UserDAOImpl Code:
3 JSp代码如下:
Login.jsp
Success.jsp,fail.jsp
User.jsp
UserList.jsp
4 Oracle.sql
二 项目框架版本号:Struts2 version: 2.2.1.1,Spring version: 3.1,Hibernate version:3.6,在Hibernate下有个jar为:javassist-3.12.0.GA.jar,在这个示例中用的是:javassist-3.7.ga.jar,这二个在这个示例中都可以用,没问题,一般原则用新版本的
项目所用jar文件如下图
三 具体实现如下:
1 配置文件:
Web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <context-param> <param-name>webAppRootKey</param-name> <param-value>s2sh.root</param-value> </context-param> <context-param> <param-name> contextConfigLocation </param-name> <param-value> classpath*:applicationContext.xml </param-value> </context-param> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/classes/log4j.properties</param-value> </context-param> <context-param> <param-name>log4jRefreshInterval</param-name> <param-value>60000</param-value> </context-param> <context-param> <param-name>log4jExposeWebAppRoot</param-name> <param-value>false</param-value> </context-param> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <listener> <listener-class> org.springframework.web.util.Log4jConfigListener </listener-class> </listener> <filter> <filter-name> encodingFilter </filter-name> <filter-class> org.springframework.web.filter.CharacterEncodingFilter </filter-class> <init-param> <param-name> encoding </param-name> <param-value> UTF-8 </param-value> </init-param> </filter> <filter-mapping> <filter-name> encodingFilter </filter-name> <url-pattern> /* </url-pattern> </filter-mapping> <filter> <filter-name> openSessionInView </filter-name> <filter-class> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter </filter-class> </filter> <filter-mapping> <filter-name> openSessionInView </filter-name> <url-pattern> /* </url-pattern> </filter-mapping> <filter> <filter-name> struts2 </filter-name> <filter-class> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter </filter-class> </filter> <filter-mapping> <filter-name> struts2 </filter-name> <url-pattern> /* </url-pattern> </filter-mapping> <welcome-file-list> <welcome-file> index.jsp </welcome-file> </welcome-file-list> </web-app>
Struts2.xml文件如下:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <package name="user" extends="struts-default"> <action name="userAction" class="u"> <result name="success">success.jsp</result> <result name="userList">userList.jsp</result> <result name="fail">fail.jsp</result> <result name="user">user.jsp</result> </action> </package> </struts>
applicationContext.xml配置文件如下:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> <context:annotation-config /> <context:component-scan base-package="com.liuzd.s2sh" /> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <value>classpath:jdbc.properties</value> </property> </bean> <bean id="dataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="${jdbc.driverClassName}" /> <property name="url" value="${jdbc.url}" /> <property name="username" value="${jdbc.username}" /> <property name="password" value="${jdbc.password}" /> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="packagesToScan"> <list> <value>com.liuzd.s2sh.entity</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> org.hibernate.dialect.Oracle10gDialect </prop> <prop key="hibernate.show_sql">true</prop> <prop key="format_sql">true</prop> </props> </property> </bean> <!-- 让spring管理sessionFactory的加一种方法 ,就是不删除hibernate.cfg.xml文件; <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="configLocation"> <value>classpath:hibernate.cfg.xml</value> </property> </bean> --> <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate"> <property name="sessionFactory" ref="sessionFactory"></property> </bean> <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate"> <property name="dataSource" ref="dataSource"></property> </bean> <bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <aop:config> <aop:pointcut id="bussinessService" expression="execution(public * com.liuzd.s2sh.service.*.*(..))" /> <aop:advisor pointcut-ref="bussinessService" advice-ref="txAdvice" /> </aop:config> <tx:advice id="txAdvice" transaction-manager="txManager"> <tx:attributes> <tx:method name="*" /> <tx:method name="add*" propagation="REQUIRED"/> <tx:method name="del*" propagation="REQUIRED"/> <tx:method name="edit*" propagation="REQUIRED"/> </tx:attributes> </tx:advice> </beans>
jdbc.properties属性文件如下:
jdbc.driverClassName=oracle.jdbc.driver.OracleDriver jdbc.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl jdbc.username=liuzd jdbc.password=liuzd
log4j.properties属性文件如下:
log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n log4j.appender.db=org.apache.log4j.FileAppender log4j.appender.db.File=${s2sh.root}/WEB-INF/logs/ssh.log log4j.appender.db.Append=true log4j.appender.db.layout=org.apache.log4j.PatternLayout log4j.appender.db.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%-5p][%c{1}] - %m%n
2 Java代码如下:
A WEB层:
BaseAction Code:
import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.struts2.ServletActionContext; import org.apache.struts2.interceptor.SessionAware; import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.ActionSupport; public class BaseAction extends ActionSupport implements SessionAware{ private static final long serialVersionUID = 1L; public void setSession(Map<String, Object> sessionMap) { } protected Map<String,Object> getSession(){ return (Map<String,Object>)ActionContext.getContext().getSession(); } protected HttpServletRequest getRequest(){ return ServletActionContext.getRequest (); } }
UserAction Code:
import java.util.List; import javax.annotation.Resource; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import com.liuzd.s2sh.entity.User; import com.liuzd.s2sh.service.UserService; @Component("u") @Scope("prototype") public class UserAction extends BaseAction { private static final long serialVersionUID = 1L; private UserService userService = null; private String message = null; private User user = null; private String action = null; public String getAction() { return action; } public void setAction(String action) { this.action = action; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } @Override public String execute() throws Exception { System.out.println("user: "+user); User dbUser = this.userService.checkUserExits(user); if (null != dbUser) { message = "用户: " + user.getUsername() + "登录成功"; System.out.println(message); getSession().put("sessionUser",dbUser); return userList(); } message = "用户: " + user.getUsername() + "登录失败"; return "fail"; } public String loadUser(){ action = "update"; message = "编辑用户信息"; User loadUser = new User(); loadUser.setId(user.getId()); user = this.userService.getUserByUid(loadUser); this.getRequest().setAttribute("myname","天涯海角"); this.getSession().put("mysex", "男"); System.out.println("loaduser: "+user); return "user"; } public String addUser(){ action = "add"; return "user"; } public String saveUser(){ this.userService.addUser(user); return "user"; } public String delUser(){ action = "del"; this.userService.delUser(user); return userList(); } public String editUser(){ System.out.println("action: "+action+",编辑用户: "+user); if("update".equals(action)){ this.userService.editUser(user); }else if("add".equals(action)){ saveUser(); } return userList(); } public String userList(){ List<User> userList = this.userService.getUserList(); System.out.println("usersize: "+userList.size() + ",user: " + userList.get(0)); getRequest().setAttribute("userList", userList); return "userList"; } public UserService getUserService() { return userService; } @Resource public void setUserService(UserService userService) { this.userService = userService; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
Service层:
UserService Code:
import java.util.List; import com.liuzd.s2sh.entity.User; public interface UserService { public User checkUserExits(User user) throws Exception; public void addUser(User user); public void editUser(User user); public void delUser(User user); public List<User> getUserList(); public User getUserByUid(User user); }
UserServiceImpl Code:
import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Component; import com.liuzd.s2sh.dao.UserDAO; import com.liuzd.s2sh.entity.User; import com.liuzd.s2sh.service.UserService; @Component("userService") public class UserServiceImpl implements UserService { private UserDAO userDao = null; public UserDAO getUserDao() { return userDao; } @Resource public void setUserDao(UserDAO userDao) { this.userDao = userDao; } public User checkUserExits(User user) throws Exception { return this.userDao.getUserByUserIdAndUserNameExits(user); } @Override public void delUser(User user) { this.userDao.delUser(user); } @Override public User getUserByUid(User user) { return this.userDao.getUser(user); } @Override public List<User> getUserList() { return this.userDao.finUserAll(); } @Override public void addUser(User user) { String id =String.valueOf(new java.util.Random().nextInt(100)); //user.setId(id); System.out.println("添加: "+user); this.userDao.saveUser(user); } @Override public void editUser(User user) { this.userDao.updateUser(user); } }
Entity层:
User Code:
@Entity @Table(name="users") public class User { private String id = null; private String username = null; private String password = null; private String address = null; private String sex = null; private Integer age = null; public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } /* * 适合ID为int,short,long的情况 * @Id @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="SEQ_USER") @SequenceGenerator(name="SEQ_USER",sequenceName="S_USER",allocationSize=1) */ @Id @GeneratedValue(generator="system-uuid") @GenericGenerator(name="system-uuid", strategy = "uuid") public String getId() { return id; } public void setId(String id) { this.id = id; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } @Override public String toString() { return "name: " + username + ",password: " + password+",sex: " + sex + ",age: " + age+",address: " + address + ",id: " + id; } }
DAO层:
UserDAO Code:
import java.util.List; import com.liuzd.s2sh.entity.User; public interface UserDAO { /** * 检查用户是否存在 * */ public User getUserByUserIdAndUserNameExits(User user); public void saveUser(User user); public void updateUser(User user); public User getUser(User user); public void delUser(User user); public List<User> finUserAll(); }
UserDAOImpl Code:
import java.util.List; import javax.annotation.Resource; import org.springframework.orm.hibernate3.HibernateTemplate; import org.springframework.stereotype.Component; import com.liuzd.s2sh.dao.UserDAO; import com.liuzd.s2sh.entity.User; @Component("userDao") public class UserDAOImpl implements UserDAO { private HibernateTemplate hibernateTemplate; public HibernateTemplate getHibernateTemplate() { return hibernateTemplate; } @Resource public void setHibernateTemplate(HibernateTemplate hibernateTemplate) { this.hibernateTemplate = hibernateTemplate; } public User getUserByUserIdAndUserNameExits(User user) { List<User> users = hibernateTemplate.find("from User u where u.username = '" + user.getUsername() + "' and u.password='"+user.getPassword()+"'"); if (users != null && users.size() > 0) { return users.get(0); } return null; } @Override public void saveUser(User user) { this.hibernateTemplate.save(user); } @Override public void delUser(User user) { User delUser = getUser(user); this.hibernateTemplate.delete(delUser); } @Override public List<User> finUserAll() { return this.hibernateTemplate.find("from User"); } @Override public User getUser(User user) { return this.hibernateTemplate.load(User.class,user.getId()); } @Override public void updateUser(User user) { this.hibernateTemplate.update(user); } }
3 JSp代码如下:
Login.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> <html> <head> <title>Sign On</title> </head> <body> <s:form action="userAction"> <s:textfield key="user.username"/> <s:password key="user.password" /> <s:submit/> </s:form> </body> </html>
Success.jsp,fail.jsp
<%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> <html> <head> </head> <body> <s:property value="message"/><br> <a href="${pageContext.request.contextPath}">返回</a> <s:debug></s:debug> </body> </html>
User.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> <html> <head> <title>用户信息</title> </head> <body> <s:form action="userAction!editUser.action"> <input type="hidden" name="action" value='<s:property value="action"/>'/> <s:property value="message"/><br> <s:if test="user.id != null"> <s:property value="user.id"/>,<s:property value="user.username"/>, <s:property value="user.age"/>,<s:property value="user.sex"/>, <s:property value="user.address"/>,<s:property value="user.password"/>, <s:property value="#request.myname"/>,<s:property value="#session.mysex"/> </s:if> <br> <table> <tr> <td> <s:hidden name="user.id"/> <s:textfield label="姓名" name="user.username"/> </td> </tr> <tr> <td> <s:textfield label="年龄" name="user.age"/> </td> </tr> <tr> <td> <s:select label="性别" name="user.sex" list="#{ 1:'男', 2: '女', 3: '未知'}" listKey="key" listValue="value" ></s:select> </td> </tr> <tr> <td> <s:textfield label="密码" name="user.password" size="50"/> </td> </tr> <tr> <td> <s:textfield label="地址" name="user.address"/> </td> </tr> <tr> <td align="right"> <s:submit vlaue="保存"/> </td> </tr> </table> </s:form> <br> <s:debug></s:debug> <br> <a href="${pageContext.request.contextPath}">返回主页</a><br> <s:a href="userAction!userList.action">返回显示</s:a> </body> </html>
UserList.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib uri="/WEB-INF/c.tld" prefix="c"%> <html> <head> <title>用户集合</title> </head> <body> <table width="50%" border="1" cellpadding="1" align="center"> <thead> <tr> <th>姓名</th> <th>年龄</th> <th>性别</th> <th>地址</th> <th>操作</th> </tr> </thead> <tbody> <!-- <s:iterator value="#request.userList" status="status" > <tr align="center"> <td><s:property value="username"/></td> <td><s:property value="age"/></td> <td><s:property value="sex"/></td> <td><s:property value="address"/></td> <td> <s:a href="userAction!addUser.action">添加</s:a> | <s:a href="userAction!loadUser.action?user.id=%{id}">编辑</s:a> | <a href="<s:url action="userAction!delUser.action"><s:param name="user.id" value="id"/></s:url>">删除</a> </td> </tr> </s:iterator> --> <c:forEach items="${requestScope.userList}" var="user"> <tr align="center"> <td>${user.username}</td> <td>${user.age}</td> <td>${user.sex eq 1 ? "男" : user.sex eq 2 ? "女" : "未知"}</td> <td>${user.address}</td> <td> <a href="${pageContext.request.contextPath}/userAction!addUser.action">添加</a> | <a href="${pageContext.request.contextPath}/userAction!loadUser.action?user.id=${user.id}">编辑</a> | <a href="${pageContext.request.contextPath}/userAction!delUser.action?user.id=${user.id}">删除</a> </td> </tr> </c:forEach> </tbody> </table> <br> <a href="${pageContext.request.contextPath}">返回</a> <br> </body> </html>
4 Oracle.sql
create table USERS ( id VARCHAR2(50) not null, username VARCHAR2(50), age NUMBER, sex VARCHAR2(1), address VARCHAR2(200), password VARCHAR2(20) ); alter table USERS add constraint PKUID primary key (ID); insert into USERS (ID, USERNAME, AGE, SEX, ADDRESS, PASSWORD, ROWID) values ('001', 'spring', 25, '1', '成都市', 'spring', ''); commit;
- S2SH整合-doc.zip (95.4 KB)
- 下载次数: 1513
- S2SH-code.rar (33.1 KB)
- 下载次数: 1459
- s2sh-lib-01.zip (9.8 MB)
- 下载次数: 1856
- s2sh-lib-02.zip (5.1 MB)
- 下载次数: 1569
评论
15 楼
chouhom
2014-02-05
给开始学s2sh框架的同学,是个不错的参考代码。
14 楼
taoen
2013-06-25
struts和spring没有整合啊,只整合了hibernate和spring
13 楼
andymu1117
2012-10-21
高人。支持
12 楼
liuzidong
2012-08-14
方便我你他! 现在网络开放的时代!我也很感谢在网络上发表文章的人,也让我学了很多!彼此吧!
11 楼
hfutzhu
2012-08-09
向楼主致敬,好人啊
10 楼
hfutzhu
2012-08-09
辛苦兄弟了
9 楼
hesai_vip
2012-07-07
向楼主致敬!!
8 楼
zc888168
2012-06-29
楼主辛苦了!!!!!! 给力哥
7 楼
wuyong060577
2012-06-17
谢谢分享,非常不错。
6 楼
baiwenlong
2012-05-10
这个肯定要攒个
5 楼
CoderDream
2012-02-22
这个要支持,感谢分享!
4 楼
waterenjoy
2011-10-31
相当不错啊,很难找到这么好的资源。
3 楼
cracet
2011-06-15
相当不错,好久不搭都忘记得差不多,楼主辛苦了!
2 楼
gbj_2008
2011-06-14
楼主相当的给力,下来回去要好study一下
1 楼
birdlily
2011-03-19
刚刚正好在查找有关此文面的资料,好,相当给力,谢谢分享,已经下载了,回去慢慢研究测试下
发表评论
-
Spring Task Schedule
2017-06-24 08:46 787链接:http://docs.spring.io/spring ... -
Spring之JDBC模板(手写)
2011-10-24 14:44 4321一 模板父类: SpringBaseDAO.java im ... -
Sprint之java.util.Time
2011-07-06 16:17 1688参考资料 1 在Spring中使用JDK Timer进行任务调 ... -
java.util.Time结合Spring发送Email
2011-07-06 15:02 2004参考资料 1 Web项目下应用Java Timer定时器 ht ... -
Spring之Email<封装了常用的四种发送Email的方法(TEXT,HTML,IMG,FILE)>
2011-07-05 11:47 29784参考资料 1 Spring邮件发送(可带附件,模板,群发,异 ... -
SpringMVC:生成Excel和PDF
2011-06-07 17:18 25408参考资料 1 用spring MVC 生成Excel和PDF ... -
SpringMVC:整合JQUERY与JSON
2011-06-03 10:45 67791参考资料 1 Spring3 MVC 笔记(二) —json+ ... -
Spring:ContextLoaderListener作用
2011-06-02 10:18 32884参考资料 1 Spring之ContextLoaderList ... -
SpringMVC+JDBC:分页示例
2011-06-01 17:22 22046一 环境:XP3+Oracle10g+MyEclipse6+( ... -
SpringMVC:上传与下载
2011-06-01 16:46 27262参照了网上相关代码 注意事项: 1 springmvc.xm ... -
Spring配置JNDI(WebLogic92)NameNotFoundException: Unable to resolve解决
2011-03-15 16:01 22291请参见: Struts2.2+Spring3.1+Hiber ... -
Spring配置JNDI(Tomcat7)
2011-03-15 13:02 12112请参见: Struts2.2+Spring3.1+Hibern ... -
spring整合hibernate关于 session的管理<三种方式>
2011-02-23 13:22 2429转载:spring整合hibernate关于 session的 ... -
Spring3 MVC Annotaction入门(登录示例)
2011-01-29 16:43 18905浏览资料 1 SpringMVC入门实例及详细讲解 http: ... -
Spring MVC入门(登录示例)
2011-01-26 10:09 17196一 环境: Myeclipse6.6+JDK1.5+Tomca ... -
spring3.0.5启动报错:org.springframework.beans.factory.BeanDefinitionStoreException
2011-01-24 16:33 42375一 开发环境:JDK5+Spring3.0.5+Myeclip ... -
转载:Spring(一)为什么要使用spring
2010-07-30 09:28 1321转载: Spring(一)为什么要使用spring http: ... -
spring的jar包详解
2009-09-19 11:05 1435转载:http://www.blogjava.net/li ...
相关推荐
在"struts2.2+spring3.05+hibernate3.6整合"项目中,我们将看到如何将这三个框架协同工作,实现一个基于MySQL数据库的应用程序。Struts2.2版本提供了更好的Action类支持和拦截器功能,Spring3.05加强了AOP(面向切面...
在实际开发中,开发者会将这三个框架的jar包整合到项目中,例如在描述中提到的"struts2+spring2.5+hibernate3.3",可能表示的是一个使用了Struts2.2、Spring3.0和Hibernate3.3的项目配置。文件名称列表中的"struts2+...
本示例将重点介绍如何在Struts2.2、Hibernate3.6和Spring3.1集成环境下实现分页功能。 首先,Struts2是Action-based的MVC框架,它提供了一种灵活的方式来处理用户请求,并通过拦截器机制增强了应用的可扩展性。...
Struts2.1、Hibernate3.1和Spring2.5是经典的Java企业级开发框架组合,简称SSH。这个整合项目主要是为了实现基本的数据操作:增加(Create)、删除(Remove)、修改(Update)和查询(Retrieve),也就是CRUD操作。...
Struts2、Spring2.5和Hibernate3.2是Java Web开发中经典的三大框架,它们的整合使用在过去的许多年里被广泛应用于企业级应用系统。这个完整的项目提供了从开发环境到运行环境的所有必要组件,包括数据库脚本,使得...
Struts2、Spring4和Hibernate4是Java Web开发中的三大主流框架,它们分别负责MVC模式中的表现层、业务层和服务层。这个最新的项目系统整合了这三个框架,旨在提供一个高效、灵活且易于维护的开发环境。下面将详细...
Struts2.2、Hibernate3.3和Spring2.5.6是三个经典的Java企业级开发框架,它们的整合能够实现MVC模式的高效应用,提供了数据持久化、业务逻辑控制以及模型视图分离等功能。在这个简单的CRUD案例中,我们将看到如何在...
Struts1.2、Spring2.5和Hibernate3.2是经典的Java企业级开发框架组合,它们各自在应用程序的不同层次上发挥着重要作用。Struts1.2是一个MVC(Model-View-Controller)框架,主要负责处理用户界面与业务逻辑之间的...
Struts2、Spring和Hibernate是Java Web开发中的三...以上就是关于“Struts2+Spring2.5+Hibernate3.2整合示例”的主要知识点,这个整合实例涵盖了Java Web开发中的重要技术,对于开发者来说,深入学习和实践将非常有益。
Struts2.2、Spring2.5.5和Hibernate3.4是经典的Java Web开发框架组合,被称为SSH(Struts2、Spring、Hibernate)或SSH2。这个组合在过去的十几年中广泛应用于企业级应用开发,提供了强大的MVC(模型-视图-控制器)...
Struts1、Spring2和Hibernate2是Java Web开发中的三个重要框架,它们分别负责MVC模式中的表现层、业务层和服务层。这个整合例子旨在展示如何将这三个框架协同工作,以构建一个完整的Java Web应用程序。 Struts1是...
【开发Web购物网站(Struts1.2+Hibernate3.1+Spring2.0)整合案例详细解析】 在构建Web购物网站时,选择合适的框架对于项目的成功至关重要。本案例中,我们采用Struts1.2、Hibernate3.1和Spring2.0这三大经典Java框架...
Struts2、Spring和Hibernate是Java Web开发中的三大框架,它们的整合应用广泛用于构建复杂的Web应用程序,如本例中的图书馆管理系统。这个系统实现了用户登录和注册功能,并且提供了对书籍表的操作,包括增、删、改...
这里我们详细探讨一下"Struts2.3.x+Spring3.1.x+Hibernate4.1整合工程"的相关知识点。 **Struts2** 是一个基于MVC设计模式的Java Web框架,它主要用于处理HTTP请求和响应,提供了强大的表单验证、国际化支持以及...
Struts2.3、Hibernate4.1和Spring3.1是Java开发中经典的SSH(Spring、Struts和Hibernate)框架组合,它们各自负责应用程序的不同层面,以实现高效、灵活的Web应用开发。在这个"Struts2.3+Hibernate4.1+Spring3.1 SSH...
在本文中,我们将详细介绍Struts2.0+Spring2.0+Hibernate3.1的登录及增删改查功能的完整演示示例。这个示例适合初学者进行学习。首先,需要了解这三种技术:Struts2、Spring和Hibernate,它们都是Java EE开发中不可...
Struts2.1.8+Spring2.5.6+Hibernate3.3.2是经典的Java Web开发框架组合,常被称为SSH。这三个框架协同工作,为开发者提供了强大的模型-视图-控制器(MVC)架构支持,使得企业级应用的开发更加高效和模块化。 Struts...
SSH整合,即Struts、Spring和Hibernate三大框架的集成,是Java Web开发中常见的技术栈。这个整合项目中包括了MySQL数据库的相关驱动,意味着它将使用MySQL作为后端数据存储。接下来,我们将深入探讨SSH整合的关键...