易截截图软件、单文件、免安装、纯绿色、仅160KB

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 文件下载时的文件名乱码解决

if(null != agent && -1 != agent.indexOf("MSIE")){ 
                    filename = URLEncoder.encode(filename
,"UTF8"); 
         }else if ......

java 将EXCEL表格数据转换成XML格式

有时候我门需要把EXCEL表格中的数据转换成XML格式 这需要用到JXL(分析EXCEL)包和JDOM包(构成XML)
import java.io.*;
import jxl.*;
import org.jdom.Element;
import org.jdom.Document;
import org.jdom.output.XMLOutputter;
/**
 *
 * @author guo
 */
public class EtoX {
    ......

Java+Mysql的数据库查找实现


public class select {
 public List XiuGai_select(String keyword){
  List list=new ArrayList();
        Connection conn = null;
  Statement stmt = null;
  String sql=null;
  ResultSet res = null;
  get ......

Effective Java 学习笔记 (6)

及时消除不使用的对象的引用, 理论上, 带有内存管理的语言是不存在内存泄漏的, 但是如果对对象的操作不当,也是可能会造成内存泄漏. 如有一个stack, 其pop函数如下. public Object pop() {                if( Element.length() == 0) return nu ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号