- 博客(6)
- 资源 (12)
- 收藏
- 关注
原创 Spring context:component-scan的使用
今天写了个SSH2的小程序,因为程序小,包名就直接用了org.*。1.<context:component-scan base-package="org.*"/>导致内存溢出 beans.xml中使用 <context:component-scan base-package="org.*"/>进行自动扫描。 结果程序启动时在加载beans.xml时停...
2011-10-20 16:14:30 111
原创 Filter中访问Spring Bean
一、DelegatingFilterProxy在Spring中提供一过滤器DelegatingFilterProxy,这个过滤器里没有过滤器的任何逻辑,DelegatingFilterProxy做的事情是代理Filter的方法,从application context里获得bean。这让bean可以获得spring web application context的生命周期支持,使配置较为轻...
2011-10-20 16:12:54 129
原创 struts2返回json和几种方式
一、response对象返回 response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("json"); out.flush(); return null; 输入结果: json二、...
2011-10-20 16:11:34 103
原创 学习spring3 mvc annotation
MVC一直用的是strtus2 mvc,刚刚看完了Spring的mvc annotation。本来打算写一份入门的教程出来的,因为自己也是刚看,还没有在实际在项目中使用过。有很多东西还只处于会用阶段,并没有深入了解。等在项目中使用过后,再重写一份出来吧。附上我学习的时候找的一些资料。 一、博客园Edward的基于注解的spring3.0.x MVC学习笔记(现在更新到九章),看...
2011-10-20 16:10:03 69
jQuery validate验证隐藏表单(hidden)域
jQuery validate很不错的一个jQuery表单验证插件。升级到了1.9版的后,发现隐藏表单域验证全部失效,网上一搜,也没查到是怎么回事。最后在1.9的changelog里发现了这么一句changelog里* Fixed #189 - :hidden elements are now ignored by defaultignore: ":hidden",ignore: ""就又开始验证...
2011-10-20 16:07:47 94
原创 Hibenate hql 中使用mysql函数DATE_SUB出错
String hql = "Update Threads set lastPost='"+ author + "' ," + "lasttime=DATE_SUB(lasttime,INTERVAL 1 YEAR)" + " where tid="+ tid;不知道Hql语句写错没有,执行时出错!org.springframework.orm.hibernate3.Hibernat...
2010-09-08 11:12:08 369 1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人