- 博客(13)
- 资源 (2)
- 收藏
- 关注
转载 spring controller 的可接收参数与返回类型
Supported method argument typesThe following are the supported method arguments:Request or response objects (Servlet API). Choose any specific request or response type, for example Ser
2017-02-16 11:26:18 1343
原创 ssh4+ maven 单元测试中ClassFormatError javax/validation/Validation
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; neste
2013-01-23 17:28:55 2230 1
原创 hibernate4 与 hibernate3-maven-plugin 不兼容
hibernate4 与 hibernate3-maven-plugin 不兼容 目前hibernate4的周边还跟不上,与spring3整合也问题多多,没事还是用hibernate3好了
2013-01-21 17:28:37 662
原创 hibernate 中HQL delete 级联问题
假若我要删除用户表的所有用户记录。使用HQL中使用 delete from User ,因为HQL是绕过session和sessionFactory缓存(如果有的话),这意味着,session将不会觉察到user的变化,若当时session缓存里有user的数据,那将是过时的数据,库表里已经不存在了。那么session连user不在也不知道,更不用说user一对多关联的 order表的记
2013-01-02 13:48:51 2045
原创 hibernate 中没事不要用映射文件中用<list>定义合集,而要是用Set
用了 表示你将要额处维护多一个字段的连续性和唯一性,看下面user.ordersorder.user user和order是双向一对多如果在user.hbm.xml中 假若你的order_id 是不连续的,比如user有三个定
2013-01-02 13:34:33 503
原创 一次请求出现 Client两次向Server发出请求的奇怪现象
我在做c/s软件时,发现一次请求出现 Client两次向Server发出请求的奇怪现象:由于刚开始时,Server端我只是简单的接收请求,并没有写“响应文”(如“HTTP/1.1 200 OK\r\n ”)给Client 就用socket.close()接束了连接。Client端很费解,所以向Server再次发送请求。总结,在Server端要好好老实回答Client的请求
2012-11-02 10:52:55 946
原创 ssh中如果遇到 xxx is not valid without active transaction
ssh中,我用了spring+strut2+hibernate(原生hibernate API ,就是dao类中不用spring的hibernateTemplate或hibernateDaoSupport类) 出现了org.hibernate.HibernateException:xxx is not valid without active transaction.查了下网,结果是 不
2012-05-24 01:46:25 1204 1
原创 netbean--- Exception in thread "main" java.lang.VerifyError: Constructor must call super() or thi
某天用netbean 运行往日正常的java文件 出了这类的异常,无法运行, Exception in thread "main" java.lang.VerifyError: ...............略................... Constructor must call super() or this()后来google了下,某位反映
2012-01-08 05:48:07 2803 1
原创 把hibernate.cfg.xml 加到 spring的applictionContext.xml的sessionFactory中
classpath:hibernate.cfg.xml hibernate.cfg.xml的配置像平常的hibernate应用一样,好处是spring 的归applictionContext.xml , hibernate 的归hibernate.cfg.xml ,分而治之
2011-11-18 16:39:23 407
原创 修改 visual studio 2010 蛋痛的界面颜色 和字体颜色
打开 Tools\Extension Manager ,在框里搜索“visual studio color theme editor” 下载 安装, 重启后多了个theme菜单, 可以随意改外面颜色了,要改字体颜色,选个自己喜欢的主题,再点theme\ customize colors 打开客户化界面,在界面了搜"text" 会list出一项叫"CommanBarTextActive",对这
2011-10-31 19:39:53 2217
原创 让Struts LookupDispatchAction 使用中文按键
只要重写 LookupDispatchAction 的getLookupMapName 方法lookupdispatchAction 的工作过程是 如 一个get 请求为例, /xxxx.do?method=save dispatchAction会根据传来的save值,从资源文件(.properties文件)中找到值为save的键,再根据这个键, getKeyMethodMap返回的Ma
2011-10-22 18:29:31 387
原创 java电子字典
这段时间,在写个背单词的软件,就顺手写了个电子词典, 等完成了一起发布初期找了好久字典库,发现网上没有公开的字典库,都是有版权的,而且还加密了,比如灵格斯的,都加密了,最后选了用星际译王 早前用的牛津 词典库,也是要版权的,星际译王也侵权用了,也没办法了,反正写来自用 ,
2011-10-01 03:36:25 844 1
原创 [开发时随手笔记]关于 ProgressMonitorInputStream 不弹出进度条 的 注意事项
<br /> sizable = new GetSizeableInputStream(p.getInputStream(), dataHandler);// BufferedInputStream b2=new BufferedInputStream(sizable); ProgressMonitorInputStream pmin = new Progress
2011-05-08 05:32:00 1021
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人