java类型注入
public class Bean1 {
private String strValue;
private int intValue;
private List listValue;
private Set setValue;
private String[] arrayValue;
private Map mapValue;
public String getStrValue() {
return strValue;
}
public void setStrValue(String strValue) {
this.strValue = strValue;
}
public int getIntValue() {
return intValue;
}
public void setIntValue(int intValue) {
this.intValue = intValue;
}
public List getListValue() {
return listValue;
}
public void setListValue(List listValue) {
this.listValue = listValue;
}
public Set getSetValue() {
return setValue;
}
public void setSetValue(Set setValue) {
this.setValue = setValue;
}
public String[] getArrayValue() {
return arrayValue;
}
public void setArrayValue(String[] arrayValue) {
this.arrayValue = arrayValue;
}
public Map getMapValue() {
return mapValue;
}
public void setMapValue(Map mapValue) {
this.mapValue = mapValue;
}
}
配置文件
<bean id="bean1" class="com.bjpowernode.spring.Bean1">
<property name="strValue" value="Hello_Spring"/>
<!--
<property name="intValue" value="123"/>
-->
<property name="intValue">
<value>123</value>
</property>
<property name="listValue">
<list>
<value>list1</value>
<value>list2</value>
</list>
</property>
<property name="setValue">
<set>
<value>set1</value>
<value>set2</value>
</set>
</property>
<property name="arrayValue">
<list>
<value>array1</value>
<value>array2</value>
</list>
</property>
<property name="mapValue">
<map>
<entry key="k1" value="v1"/>
<entry key="k2" value="v2"/>
</map>
</property>
</be
相关文档:
最近看到几篇关于java中操作ftp的文章,所以想写一个总结贴,标记一下,方便以后应用。
首先,我们可以应用java中的ftp库,java中提供了一个ftpclient的类,提供了很多操作ftp的方法。
先上代码,一看便知,很简单,应用时只要传递相应的server,user,password等就行了。
import java.io.IOException;
import sun.net. ......
if(null != agent && -1 != agent.indexOf("MSIE")){
filename = URLEncoder.encode(filename
,"UTF8");
}else if ......
Here is a simple library to query Google Maps with the following features:
geocode addresses to their geographic coordinates
retrieve static images with given custom size, format and zoom
To see a live sample of this API, you can check here: Java ME Google Maps API sample MIDlet
Contents
[h ......
package com.navinfo.mygim.admin.util;
/*
* Pinyin.java
* vicbay
*/
public class Pinyin{
private String[] name = { "zuo", "zun", "zui", "zuan", "zu", "zou",
"zong", ......
自从学习Java以来已经一年有余了,对Java还只是初阶段的了解,都怪在学校的时候贪玩没有有效的利用时间,现在在一个培训学校学习Java,现在就要做项目了还是什么都不懂,还好有Csdn。
在Csdn的日子里叫我找到了家的感觉,得到了很 ......