- 浏览: 56764 次
- 性别:
- 来自: 北京
-
文章列表
一个简单的增删查改demo(整合三大框架)
- 博客分类:
- 项目总结
三大框架,单张表的增删查改
分享链接:http://pan.baidu.com/share/link?shareid=140210&uk=3842825398
“session已关闭”——解决方案
- 博客分类:
- 易犯错误
<filter>
<filter-name>hibernateSessionFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hibernateSessionFilter</filter-name& ...
Action层各种属性驱动,list
- 博客分类:
- 易犯错误
Action层各种属性驱动,list,均需加get,set方法,切记
Spring常用测试代码
- 博客分类:
- 学习总结
Spring常用测试代码(DaoImpl);
public static void main(String[] args) throws Exception {
ApplicationContext context=new ClassPathXmlApplicationContext(new String[]{"applicationContext.xml"});
SendMsgDao ud=(SendMsgDao)context.getBean("sendMsgDaoImpl");
System.out.println(ud.getClas ...
mappedBy属性:one2many
- 博客分类:
- 易犯错误
附一个one2many的例子 帮助理解mappedBy属性。
例子中:
@Entity
public class Department {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int deptid;
private String dname;
private String location;
@OneToMany(mappedBy = "department")
private Set<User> users = new HashSet<User ...
Spring Annotation注解:易错点
- 博客分类:
- 易犯错误
用注解以来,发现经常漏配置,所以在这把所有需要写注解的地方都列出来。
Action层:
@Component
@Scope("prototype")
public class SendMsgAction extends BaseAction{
private int[] ids;
private SendMsg sendMsg;
@Resource
private SendMsgService sendMsgService;
Dao层:接口并不需要配注解。但是实现层须有如下配置:
1、 publi ...
http://blog.sina.com.cn/s/blog_45873fe10100t072.html
小区物业管理系统(SSH CRUD)
- 博客分类:
- 项目总结
练手的一个项目,很多不完美的地方。但可从中学习三大框架的简单应用crud、事物管理、传值、以及hibernateTemplate。
地址:http://115.com/u/62373112/house.zip
三级联动(DWR框架,hibernate)
- 博客分类:
- 基础训练
利用DWR框架做三级联动,代码更为清晰,可以在jsp界面直接操作后台的dao层去数据库取数据。
http://www.cnblogs.com/yubinfeng/archive/2010/11/02/1867386.html
通配符:
% 表示一个和多个字符
_表示一个字符
如:
select * from emp where ename like 'J%';
select * from emp where ename like '_A%';
1、jsp与jsp之间传参数:
A页面:
<a href="/house/jsp/Tenant/Tenant_add.jsp?houseId=<s:property value="#house.id"/>">此位招租</a>
这里如果成功的话,当鼠标移至“此位招租”时,会出现houseId,如下图
B页面如何接收:
<input type="hidden" name="houseId" value="${param.houseId}" />
...