??xml version="1.0" encoding="utf-8" standalone="yes"?>久久se精品一区精品二区,国产精品永久免费,懂色av影视一区二区三区 http://www.aygfsteel.com/fisher/天行健,君子以自Z息。地势坤Q君子以厚d载物?/description>zh-cn Thu, 03 Jul 2025 03:37:47 GMT Thu, 03 Jul 2025 03:37:47 GMT 60 intern()得到的String之间?= http://www.aygfsteel.com/fisher/archive/2007/03/11/103148.htmlFisher Fisher Sun, 11 Mar 2007 13:09:00 GMT http://www.aygfsteel.com/fisher/archive/2007/03/11/103148.html http://www.aygfsteel.com/fisher/comments/103148.html http://www.aygfsteel.com/fisher/archive/2007/03/11/103148.html#Feedback 0 http://www.aygfsteel.com/fisher/comments/commentRss/103148.html http://www.aygfsteel.com/fisher/services/trackbacks/103148.html 阅读全文 ]]> 用例关系中的include和extend的区别:(x) http://www.aygfsteel.com/fisher/archive/2007/02/01/97290.htmlFisher Fisher Thu, 01 Feb 2007 07:31:00 GMT http://www.aygfsteel.com/fisher/archive/2007/02/01/97290.html http://www.aygfsteel.com/fisher/comments/97290.html http://www.aygfsteel.com/fisher/archive/2007/02/01/97290.html#Feedback 0 http://www.aygfsteel.com/fisher/comments/commentRss/97290.html http://www.aygfsteel.com/fisher/services/trackbacks/97290.html 当每一ơ执行用?的时候,都必L行用?Q那么用? (tng) include (tng) 用例2Q?tng) (tng)?br /> 如果不是每一ơ执行用?的时候都必须执行用例2Q只是在有些时候会(x)在执行用?的时候执行用?Q那么用? (tng) extend (tng) 用例2?img src ="http://www.aygfsteel.com/fisher/aggbug/97290.html" width = "1" height = "1" /> ]]>Spring中常见数据源的配|参? http://www.aygfsteel.com/fisher/archive/2006/12/27/90296.htmlFisher Fisher Wed, 27 Dec 2006 06:32:00 GMT http://www.aygfsteel.com/fisher/archive/2006/12/27/90296.html http://www.aygfsteel.com/fisher/comments/90296.html http://www.aygfsteel.com/fisher/archive/2006/12/27/90296.html#Feedback 0 http://www.aygfsteel.com/fisher/comments/commentRss/90296.html http://www.aygfsteel.com/fisher/services/trackbacks/90296.html Spring中常见数据源的配|参? 一共分为直接连接、连接池、jndil定三种
1、直接连?/p>
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName"> <value>com.mysql.jdbc.Driver</value> </property> <property name="url"> <value>jdbc:mysql://127.0.0.1:3306/test</value> </property> <property name="username"> <value>admin</value> </property> <property name="password"> <value/> </property> </bean>
2、连接池
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName"> <value>com.mysql.jdbc.Driver</value> </property> <property name="url"> <value>jdbc:mysql://127.0.0.1:3306/test</value> </property> <property name="username"> <value>admin</value> </property> <property name="password"> <value/> </property> </bean>
3 jndiQ以tomcatZ
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName"> <value>java:comp/env/jdbc/TestDB</value> </property> </bean>
注意每种容器的jndi写法不同Q所以java:comp/env/jdbc/TestDB为其全称Q但在配|jndi时可能会(x)是其中一部分Q如tomcat配置jdbc/TestDB
配置错误?x)报javax.naming.NameNotFoundException: Name jdbc is not bound in this Context异常
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=627248
]]>Hibernate&Spring http://www.aygfsteel.com/fisher/archive/2006/12/26/90125.htmlFisher Fisher Tue, 26 Dec 2006 07:42:00 GMT http://www.aygfsteel.com/fisher/archive/2006/12/26/90125.html http://www.aygfsteel.com/fisher/comments/90125.html http://www.aygfsteel.com/fisher/archive/2006/12/26/90125.html#Feedback 0 http://www.aygfsteel.com/fisher/comments/commentRss/90125.html http://www.aygfsteel.com/fisher/services/trackbacks/90125.html http://www-128.ibm.com/developerworks/library/j-hibern/?ca=dnt-515 ]]>cM饰词可见?/title> http://www.aygfsteel.com/fisher/archive/2006/12/22/89487.htmlFisher Fisher Fri, 22 Dec 2006 04:15:00 GMT http://www.aygfsteel.com/fisher/archive/2006/12/22/89487.html http://www.aygfsteel.com/fisher/comments/89487.html http://www.aygfsteel.com/fisher/archive/2006/12/22/89487.html#Feedback 0 http://www.aygfsteel.com/fisher/comments/commentRss/89487.html http://www.aygfsteel.com/fisher/services/trackbacks/89487.html
(tng) (tng) (tng) (tng) (tng) (tng)
同一个类?/span>
同一个包?/span>
不同包中的子c?/span>
不同包中非子c?/span>
Private
Y
(tng)
(tng)
(tng)
Default (tng) (tng) (tng) (tng) (tng)
Y
Y
(tng)
(tng)
Protected
Y
Y
Y
(tng)
Public (tng) (tng) (tng) (tng) (tng) (tng)
Y
Y
Y
Y
]]> Java开源项目相关网址 http://www.aygfsteel.com/fisher/archive/2006/12/22/89477.htmlFisher Fisher Fri, 22 Dec 2006 03:32:00 GMT http://www.aygfsteel.com/fisher/archive/2006/12/22/89477.html http://www.aygfsteel.com/fisher/comments/89477.html http://www.aygfsteel.com/fisher/archive/2006/12/22/89477.html#Feedback 1 http://www.aygfsteel.com/fisher/comments/commentRss/89477.html http://www.aygfsteel.com/fisher/services/trackbacks/89477.html Hibernate Synchronizer http://sourceforge.net/projects/hibernatesynch/ Spring 在线手册http://www.jactiongroup.net/reference/html/ Jaction Group http://www.jactiongroup.net/ IBM Java技?br />http://www-128.ibm.com/developerworks/java/ http://www-128.ibm.com/developerworks/cn/websphere/ (tng) (tng) (tng) (tng) WebSphere ]]>Java取得日期旉的代?/title> http://www.aygfsteel.com/fisher/archive/2006/12/22/89446.htmlFisher Fisher Fri, 22 Dec 2006 02:12:00 GMT http://www.aygfsteel.com/fisher/archive/2006/12/22/89446.html http://www.aygfsteel.com/fisher/comments/89446.html http://www.aygfsteel.com/fisher/archive/2006/12/22/89446.html#Feedback 0 http://www.aygfsteel.com/fisher/comments/commentRss/89446.html http://www.aygfsteel.com/fisher/services/trackbacks/89446.html (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)SimpleDateFormat (tng)dateFormat = new (tng)SimpleDateFormat( " yyyyMMddHHmmss " ); (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)String (tng)date = dateFormat.format( new (tng)Date()); (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) return (tng)Long.parseLong(date); 使用Canlendar cL取得旉 (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)Calendar (tng)time = Calendar.getInstance(); (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)time.setTime( new (tng)Date( 1165991528156L )); (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)System.out.println( " Year: " + time.get(Calendar.YEAR)); (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)System.out.println( " MONTH: " + time.get(Calendar.MONTH)); (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)System.out.println( " DATE: " + time.get(Calendar.DATE)); (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)System.out.println( " HOUR: " + time.get(Calendar.HOUR)); (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)System.out.println( " MINUTE: " + time.get(Calendar.MINUTE)); (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)System.out.println( " SECOND: " + time.get(Calendar.SECOND)); ]]> ,HashMap和Hashtable?qing)HashSet的区?/title> http://www.aygfsteel.com/fisher/archive/2006/12/13/87398.htmlFisher Fisher Wed, 13 Dec 2006 02:22:00 GMT http://www.aygfsteel.com/fisher/archive/2006/12/13/87398.html http://www.aygfsteel.com/fisher/comments/87398.html http://www.aygfsteel.com/fisher/archive/2006/12/13/87398.html#Feedback 0 http://www.aygfsteel.com/fisher/comments/commentRss/87398.html http://www.aygfsteel.com/fisher/services/trackbacks/87398.html (tng) Hashtablel承Map接口Q实C个key-value映射的哈希表。Q何非I(non-nullQ的对象都可作ؓ(f)key或者value? (tng) (tng) d数据使用put(key, (tng) value)Q取出数据用get(key)Q这两个基本操作的时间开销为常数? (tng) (tng) Hashtable通过initial (tng) capacity和load (tng) factor两个参数调整性能。通常~省的load (tng) factor (tng) 0.75较好地实C(jin)旉和空间的均衡。增大load (tng) factor可以节省I间但相应的查找旉增大,q会(x)影响像get和putq样的操作? (tng) (tng) 使用Hashtable的简单示例如下,?Q?Q?攑ֈHashtable中,他们的key分别是”one”,”two”,”three”:(x) (tng) (tng) Hashtable (tng) numbers (tng) = (tng) new (tng) Hashtable(); (tng) (tng) numbers.put(“one? (tng) new (tng) Integer(1)); (tng) (tng) numbers.put(“two? (tng) new (tng) Integer(2)); (tng) (tng) numbers.put(“three? (tng) new (tng) Integer(3)); (tng) (tng) 要取Z个数Q比?Q用相应的keyQ? (tng) (tng) Integer (tng) n (tng) = (tng) (Integer)numbers.get(“two?; (tng) (tng) System.out.println(“two (tng) = (tng) ? (tng) + (tng) n); (tng) (tng) ׃作ؓ(f)key的对象将通过计算其散列函数来定与之对应的value的位|,因此M作ؓ(f)key的对象都必须实现hashCode和equalsҎ(gu)。hashCode和equalsҎ(gu)l承自根cObjectQ如果你用自定义的类当作key的话Q要相当心(j)Q按照散列函数的定义Q如果两个对象相同,即obj1.equals(obj2)=trueQ则它们的hashCode必须相同Q但如果两个对象不同Q则它们的hashCode不一定不同,如果两个不同对象的hashCode相同Q这U现象称为冲H,冲突?x)导致操作哈希表的时间开销增大Q所以尽量定义好的hashCode()Ҏ(gu)Q能加快哈希表的操作? (tng) (tng) 如果相同的对象有不同的hashCodeQ对哈希表的操作?x)出现意想不到的l果Q期待的getҎ(gu)q回nullQ,要避免这U问题,只需要牢C条:(x)要同时复写equalsҎ(gu)和hashCodeҎ(gu)Q而不要只写其中一个? (tng) (tng) Hashtable是同步的? (tng) (tng) (tng) (tng) HashMapc? (tng) (tng) HashMap和HashtablecMQ不同之处在于HashMap是非同步的,q且允许nullQ即null (tng) value和null (tng) key。,但是HashMap视ؓ(f)CollectionӞvalues()Ҏ(gu)可返回CollectionQ,其P代子操作旉开销和HashMap的容量成比例。因此,如果q代操作的性能相当重要的话Q不要将HashMap的初始化定w讑־q高Q或者load (tng) factorq低? (tng) (tng) (tng) (tng) WeakHashMapc? (tng) (tng) WeakHashMap是一U改q的HashMapQ它对key实行“弱引用”,如果一个key不再被外部所引用Q那么该key可以被GC回收? HashSet请参考对Set的描q? (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) Set是一U不包含重复的元素的CollectionQ即L的两个元素e1和e2都有e1.equals(e2)=falseQSet最多有一个null元素? (tng) (tng) Set的构造函数有一个约束条Ӟ传入的Collection参数不能包含重复的元素。 h意:(x)必须心(j)操作可变对象QMutable (tng) ObjectQ。如果一个Set中的可变元素改变?sh)(jin)自w状态导致Object.equals(Object)=true导致一些问题?br />两个通用Set实现是HashSet (tng) 和TreeSet。要军_用哪一个,那是非常单明?jin)的? (tng) HashSet (tng) 要快得多 (tng) (对大多数操作是常数时间之于对数时_(d)constant (tng) time (tng) vs. (tng) log (tng) timeQ?, (tng) 但不提供排序保证。如果你需要? (tng) SortedSet (tng) 中的操作Q或者按序q代对你来说是重要的Q那么请使用 (tng) TreeSet? (tng) 否则Q? (tng) HashSet? (tng) 在大多数旉都不使用 (tng) HashSet (tng) Q对你来说是个公q的赌博? (tng) (tng) (tng) (tng) (tng) 关于 (tng) HashSetQ有一件事应该牢记Q即条目数和容量之和来Ԍq代是线性的。因此,如果q代性能很重要,那就应该慎重选择一个适当的初始容量。容量选得太大Q既费I间Q也费旉? (tng) 默认的初试容量是101, (tng) 一般来Ԍ它比你所需要的要多。可以? (tng) int (tng) 构造函数来指定初始定w。要分配 (tng) HashSet (tng) 的初始容量ؓ(f)17: (tng) (tng) (tng) (tng) (tng) Set (tng) s= (tng) new (tng) HashSet(17); (tng) (tng) (tng) (tng) (tng) HashSets (tng) 另有一个称? (tng) 装蝲因数Qload (tng) factorQ? (tng) ?调整参数Qtuning (tng) parameterQ? (tng) 。如果你非常在乎你的 (tng) HashSet (tng) 的空间的使用Q请阅读 (tng) HashSet (tng) 文本以获取详l信息。否则,׃用默认值吧。如果你接受默认装蝲因数Q但你确实又x(chng)定初始容量,那么Q选一个大U是你期望你? (tng) Set (tng) 增长到的容量的两倍的数。如果你的猜不着边,它也可以增长Q或只是费一点空间。但都没有大问题。如果你知道有关正确寸的一个最?jng)_|用它吧;如果不知道,那就使用一个旧的|或用一个偶数倹{它真的不是非常重要。这些事情只能 (tng) HashSet (tng) E稍变好一点点? (tng) (tng) (tng) (tng) (tng) TreeSet (tng) 没有调整参数。除 (tng) clone (tng) 之外QHashSet (tng) ? (tng) TreeSet (tng) 都仅有那些由它们各自的接口所要求的操? (tng) (Set (tng) ? (tng) TreeSet)Q而没有Q何别的操作。?tng) (tng) (tng) (tng)?br /> (tng) ]]> ArrayList和Vector的区?/title> http://www.aygfsteel.com/fisher/archive/2006/12/13/87397.htmlFisher Fisher Wed, 13 Dec 2006 02:20:00 GMT http://www.aygfsteel.com/fisher/archive/2006/12/13/87397.html http://www.aygfsteel.com/fisher/comments/87397.html http://www.aygfsteel.com/fisher/archive/2006/12/13/87397.html#Feedback 0 http://www.aygfsteel.com/fisher/comments/commentRss/87397.html http://www.aygfsteel.com/fisher/services/trackbacks/87397.html (tng) ArrayList实现?jin)可变大的数组。它允许所有元素,包括null。ArrayList没有同步? (tng) (tng) sizeQisEmptyQgetQsetҎ(gu)q行旉为常数。但是addҎ(gu)开销为分摊的常数Q添加n个元素需要O(n)的时间。其他的Ҏ(gu)q行旉为线性? (tng) (tng) 每个ArrayList实例都有一个容量(CapacityQ,即用于存储元素的数组的大。这个容量可随着不断d新元素而自动增加,但是增长法q没有定义。当需要插入大量元素时Q在插入前可以调用ensureCapacityҎ(gu)来增加ArrayList的容量以提高插入效率? (tng) (tng) 和LinkedList一PArrayList也是非同步的QunsynchronizedQ? (tng) (tng) (tng) (tng) Vectorc? (tng) (tng) Vector非常cMArrayListQ但是Vector是同步的。由Vector创徏的IteratorQ虽然和ArrayList创徏的Iterator是同一接口Q但是,因ؓ(f)Vector是同步的Q当一个Iterator被创且正在被用,另一个线E改变(sh)(jin)Vector的状态(例如Q添加或删除?jin)一些元素)(j)Q这时调用Iterator的方法时抛出ConcurrentModificationExceptionQ因此必L莯异常。?tng)?img src ="http://www.aygfsteel.com/fisher/aggbug/87397.html" width = "1" height = "1" /> ]]> 关于HttpURLConnection.setFollowRedirects http://www.aygfsteel.com/fisher/archive/2006/12/11/86934.htmlFisher Fisher Mon, 11 Dec 2006 08:13:00 GMT http://www.aygfsteel.com/fisher/archive/2006/12/11/86934.html http://www.aygfsteel.com/fisher/comments/86934.html http://www.aygfsteel.com/fisher/archive/2006/12/11/86934.html#Feedback 1 http://www.aygfsteel.com/fisher/comments/commentRss/86934.html http://www.aygfsteel.com/fisher/services/trackbacks/86934.html 关于HttpURLConnection.setFollowRedirects(?
public static void HttpURLConnection.setFollowRedirects(boolean followRedirects) public void HttpURLConnection.setInstanceFollowRedirects(boolean followRedirects) 前者设|所有的httpq接是否自动处理重定向; 后者设|本ơ连接是否自动处理重定向?br />讄成trueQ系l自动处理重定向Q设|成falseQ则需要自׃http reply中分析新的url 自己重新q接?br />
]]>
վ֩ģ壺
|
|
ƽ |
|
|
|
|
|
|
ԣ |
|
ȫ |
ͬ |
̨ |
|
ԣ |
|
Ȩ |
̨ |
|
ӱʡ |
ȫ |
|
̨ |
|
ڻ |
̨ |
|
|
ͬ |
Ϫ |
» |
ԭ |
ɽ |
|
״ |
|
|
|
ɳ |
|