http://code.google.com/p/springside/ spring学习网
两种显示方式:spring2.5---petstore (2)struts1.2---action
PetStoreFacade 类的使用,很有用,以及BaseAction extends Action
public abstract class BaseAction extends Action {
private PetStoreFacade petStore;
public void setServlet(ActionServlet actionServlet) {
super.setServlet(actionServlet);
if (actionServlet != null) {
ServletContext servletContext = actionServlet.getServletContext();
WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
this.petStore = (PetStoreFacade) wac.getBean("petStore");
}
}
protected PetStoreFacade getPetStore() {
return petStore;
}
}
非常有用。
以及PetStoreImpl
public class PetStoreImpl implements PetStoreFacade, OrderService {
private AccountDao accountDao;
private CategoryDao categoryDao;
private ProductDao productDao;
private ItemDao itemDao;
private OrderDao orderDao;
.....}
可以借鉴,是与多个表的操作有关。
public class SqlMapOrderDao extends SqlMapClientDaoSupport implements OrderDao {
private SqlMapSequenceDao sequenceDao;
。。}
可以获取一个id.
自已对这个Demo的看法:
用到了对角色的控制,以及Action的继承。一个字牛。BaseAction ,SecureBaseAction对安全的控制。
用到了抽象方法。使我对抽象方法加深了解。还有struts-config.xml中的global-forwards的使用。
------------------------
Error creating bean with name 'UserDAO' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/l?????
包有重复的,版本不同。asm.jar
分享到:
相关推荐
rt ActiveMQ5.1+Spring2.5的Demo
本实例是一个Spring与Hibernate结合的例子,很好地展示了用Spring的Ioc容器来灵活地定义Bean实现DAO和使用Spring的AOP实现事务管理。
这是一个struts 1.2 + spring 2.5 + hibernate 3.2框架demo, 运行环境为eclipse 3.2 + tomcat 5.5 + oracle 11g
DWR 结合Struts2 Hibernate Spring开发 这是一个开发Ajax的好框架
CXF2.5.0+Spring2.5 集成DEMO
spring2.5 + hibernate3.2x 标注(annotation)开发的简单示例 http://blog.csdn.net/IamHades/archive/2008/01/11/2038188.aspx
经过测试 实现Strut1和Spring2.5的集成 实现了Spring声明式事物管理 我的博客园地址 http://www.cnblogs.com/qylbg/ 邮箱1055592535@qq.com
Spring2.5发送邮件程序Demo 希望大家喜欢
如何掌握SPRINGAOP DEMO中有详细的处理过程
由于上传限制,lib包不能上传,大家可以下载spring2.5版本的支持库(下最大的那个zip包),全部加进去就行了,还有mysql的连接包,项目很简单,直接导入eclipse,就可以使用,包内有mysql的sql文件,框架已经搭好,...
一个Struts2+Spring2.5+SiteMesh的小DEMO,仅供大家做个参考!我也刚学会。欢迎大家多交流!
Struts2 Spring2.5集成:系统登陆demo--带lib可直接运行
包括richfaces mysql log4j 在eclipse里手动配置环境经常会因jar出现种种问题,我把完整的jsf2.0 spring2.5 hibernate3整合所有jar传上来希望有用 如果有需要我会传上一个jsf2.0 spring hibernate的小demo上来
这是Spring2.5集成JPA的有关事务的例子,挺实用的哦!
Struts1.3+spring2.5+JPA(hibernate) 实现的一个小示例,比较适合初学者和整合配置查询。
NULL 博文链接:https://johnnycan.iteye.com/blog/789995
基于Struts2.18+Spring2.5+Hibernater3.3+Annotation注解开发的电子商务网站demo
1、SHH整合 详细清晰的标准配置,主流的应用配置,struts2.2+spring2.5+hibernate3.0 2、结合MYSQL轻量级数据库,有写好的库表sql 3、整合日志管理配置,及Spring代理日志管理的配置及应用 4、应用WEB前段主流技术,...
struts2+ibatis2.x+spring2.5整合的一个demo 适合新手学习