09 2014 档案

hibernate3 与hibernate4的一处不同
摘要:hibernate4不支持1.5的jdk,为了在websphere6上面使用,将项目的hibernate降级为3.6.10的版本,spring-orm.jar 包虽然不用更换,但是spring的配置文件有一处需要修改。之前hibernate4的配置是:com.*.*.entity由于Hibernat... 阅读全文

posted @ 2014-09-23 17:25 xhyper 阅读(255) 评论(0) 推荐(0)

严重: Context initialization failed,TypeNotPresentExcepti解决:struts注释annotation加载错误
摘要:bug记录StrutsmavenJavaApache系统加载时出现:严重: Context initialization failedjava.lang.TypeNotPresentException: Type javax.annotation.Resource not presentCaused... 阅读全文

posted @ 2014-09-22 15:51 xhyper 阅读(896) 评论(0) 推荐(0)

两个权限管理框架
摘要:两个权限管理框架Spring SecurityApache Shiro 阅读全文

posted @ 2014-09-19 18:42 xhyper 阅读(178) 评论(0) 推荐(0)

今天出现一个Spring无法向Service里面注入bean的异常
摘要:今天出现一个Spring无法向某个Service里面注入另外一个Service的异常,后来检查过了才发现是因为这个被注入Service,里面注入了自身,特此记录一下。 阅读全文

posted @ 2014-09-19 13:33 xhyper 阅读(359) 评论(0) 推荐(0)

Struts2 开发 编码问题汇总
摘要:Struts2:中文乱码问题1.中文乱码问题到处都有,因为编码格式一人一套,页面有页面编码格式,action有action编码格式,servlet有servlet编码格式,数据库有数据库编码格式,而且不同数据库还有不同的格式,五花八门,应有尽有。如果网页要支持国际化,那字符编码格式只能是选择UTF-... 阅读全文

posted @ 2014-09-02 21:04 xhyper 阅读(847) 评论(0) 推荐(0)

GSON将Java对象转成JSON时,如何排除某些字段
摘要:GSON是Google发布的JSON序列化/反序列化工具,非常容易使用。本文简要讨论在使用GSON将Java对象转成JSON时,如何排除某些字段。最简单的用法假设有下面这个类: 1 class MyObj { 2 3 public int x; 4 public int y; 5 ... 阅读全文

posted @ 2014-09-01 16:52 xhyper 阅读(5335) 评论(0) 推荐(0)

导航