摘要: java.util.Date utilDate = new java.util.Date(); java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime()); 阅读全文
posted @ 2010-10-17 18:44 qiang.xu 阅读(171) 评论(0) 推荐(0) 编辑
摘要: DateDeprecated.As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date) or GregorianCalendar(year + 1900, month, date).Allocates a Date object and initializes it so that it represents midnight, local time, at the beginning of the day specified by the year, month, and date argumen 阅读全文
posted @ 2010-10-17 18:43 qiang.xu 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 本文中主要包含:12.使用value元素设定属性13.使用null设定空值14.使用collection设定集合15.定义内部bean16.使用idref元素预检查错误17.使用ref设定依赖18.value和ref的简写12.使用value元素设定属性spring中value元素通常使用字符串来制定属性,但是spring在背后会使用javaBeans的PropertiesEditors将这些字符串从java.lang.String转换成真实的类型。13.使用null设定空值<value></value> 上面其实相当于一个&qu 阅读全文
posted @ 2010-10-17 10:39 qiang.xu 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 本文中主要包含下面的几个内容:7.何时使用singleton8.设置bean的属性和协作者9.bean构造函数选择决议10.自动装配11.依赖检查7.何时使用singleton如果bean使用的是singleton的话,那么通过getBean得到的始终是一个对象,如果使用的是prototype的话,那么每次spring会重新new一个新的对象。下面是测试的代码片段:<bean id="singletoninstance" class="singletonornot.POJO" abstract=& 阅读全文
posted @ 2010-10-17 09:48 qiang.xu 阅读(1309) 评论(0) 推荐(0) 编辑