利用 JAVA 操作 EXCEL 文件 http://www.ibm.com/developerworks/c…
不静之心

分类:服务端
声明注解式事务
参考错误解决: 终于找到全annotation配置springMVC的方法了(事务不失效): http://i…
spring mvc 中文乱码问题解决
在eclipse环境里,页面传输数据的时候通常用ISO-8859-1这个字符集 可以用 str = new S…
SpringMVC 接收表单数据的方式
http://blog.csdn.net/w40338544/article/details/6881784 …
从文件得到ByteArrayOutputStream
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
public static ByteArrayOutputStream getOutputStream(String filePath){ File file = new File(filePath); FileInputStream in = null; ByteArrayOutputStream out = new ByteArrayOutputStream(); try { in = new FileInputStream(file); byte[] buffer = new byte[in.available()]; in.read(buffer); out.write(buffer); } catch (Exception e) { e.printStackTrace(); }finally{ try { if(in!=null) in.close(); } catch (Exception e2) { } } return out; } |
Convert HTML to PDF using iText
http://www.rgagnon.com/javadetails/java-html-to-pdf-usi…
Java实现HTML代码生成PDF文档
参考: http://blog.csdn.net/zdtwyjp/article/details/576935…
java调用存储过程和函数
存储过程:有参数
1 2 3 4 5 6 7 8 9 10 11 12 13 |
String rSet=null; CallableStatement cStatement=null; try { cStatement=connection.prepareCall("{Call sellTicketPROC(?,?,?,?,?,?,?)}"); cStatement.setString(1, lineID); cStatement.setString(2, beginStation); cStatement.setString(3, endStation); cStatement.setString(4, date); cStatement.setString(5, TrainNum); cStatement.setString(6, seatTyle); cStatement.registerOutParameter(7,Types.VARCHAR); cStatement.execute(); rs=cStatement.getString(7);//得到输出结果 |
调用函数: [crayon…
Java反射经典实例 Java Reflection Cookbook
http://orangewhy.iteye.com/blog/56011 Java提供了一套机制来动态执行方…
JAVA 随机字符串生成方法
http://hi.baidu.com/yinfuqing666/blog/item/b9c3a0d21917…
从Spring的Bean中获取servletcontext 和 applicationContext
http://hjy2099.iteye.com/blog/290591 [crayon-688ffc0cbb…
Spring读取配置文件,获取bean的几种方式
参考:http://blog.sina.com.cn/s/blog_45fd882f0100pgv0.html…
spring 读取properties配置文件
通过Spring读取properties配置文件的信息 Spring 读取properties 在配置文件里面…
Java InputStream 的mark 和reset操作
http://hi.baidu.com/lee_eva/blog/item/e60803dba2d00ad1b…
Blob、InputStream、byte 互转
Blob、InputStream、byte 互转 本文URL: http://blog.csdn.net/su…
带有排序和过滤功能的JTable
http://blog.csdn.net/vanessa219/article/details/2795899…
用JAVA轻松操作properties文件
http://www.blogjava.net/action/archive/2006/08/21/64804…
使用BeanUtils时,Date类型值为空的解决方法
解决办法参考:http://hi.baidu.com/fcp_bd/blog/item/0e632783c08…
Struts2+Sitemesh
需要jar: sitemesh-2.4.2.jar struts2-sitemesh-plugin-2.2.1…
SSH全注解-annotation详细配置
SSH全注解-annotation详细配置 http://www.iteye.com/topic/816574…
使用ApplicationContextAware得到一个ApplicationContext对象
http://blog.csdn.net/tohmin/article/details/6015289 [cr…
JAVA中怎么实现国际化(ResourceBundle 与locale的使用 )
http://bbsanwei.iteye.com/blog/271299 [crayon-688ffc0cb…
详解spring事务属性和Transactional配置
详解spring事务属性:http://www.iteye.com/topic/78674 Transacti…
springMVC3集成DWR3
springMVC集成DWR: 参考: http://www.iteye.com/topic/209008 h…
Spring MVC3: Controller接受Form数据
Spring MVC3: Controller接受Form数据 [crayon-688ffc0cbc80e02…
Spring2.5 访问 Session 属性的四种策略
http://www.blogjava.net/mingj/archive/2008/10/12/233871…
at least 1 bean which qualifies as autowire candidate
参考: http://space.baidu.com.cn/%B5%DA%D2%BB%B8%F6%C9%CF%…
注解实现,报错sessionFactory’ or ‘hibernateTemplate’ is required
http://songfantasy.iteye.com/blog/656082 [crayon-688ffc…
Spring3.0MVC和Hibernate基于annotation注解的整合
http://xlaohe1.iteye.com/blog/1139028 一下代码不完整的,可参考 http…
终于找到全annotation配置springMVC的方法了(事务不失效)
http://icanfly.iteye.com/blog/778401 icanfly 写道 如果带上事务,…
Spring 在配置中使用*.properties
http://www.blogjava.net/wmcoo/articles/333345.html [cra…
Spring,Hibernate注解
<context:component-scan />指定Bean扫描的包,多个包逗号隔开,任何标注…
关于注解的参考
参考: http://sducxh.iteye.com/blog/639761 http://zhangli-…
移动文件夹
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
function move_d($source, $target) { if (is_dir ( $source )) { $dest_name = basename ( $source ); if (! mkdir ( $target . $dest_name )) { return false; } $d = dir ( $source ); while ( ($entry = $d->read ()) !== false ) { if (is_dir ( $source . $entry )) { if ($entry == "." || $entry == "..") { continue; } else { move_d ( "$source$entry\\", "$target$dest_name\\" ); } } else { if (! copy ( "$source$entry", "$target$dest_name\\$entry" )) { return false; }else{ unlink($source); } } } } else { if (! copy ( "$source$entry", "$target$dest_name\\" )) { return false; } } return true; } |
删除文件夹
强制删除:[第二个参数true的时候是强制删除] [crayon-688ffc0cbd65e829007029…