package com.bebig.dao.impl;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import com.bebig.dao.UserDAO;
import com.bebig.model.User;


public class UserDAOImpl implements UserDAO
{
private Set<String> sets;
private List<String> lists;
private Map<String, String> maps;
private Properties props;

public Set<String> getSets()
{
return sets;
}

public void setSets(Set<String> sets)
{
this.sets = sets;
}

public List<String> getLists()
{
return lists;
}

public void setLists(List<String> lists)
{
this.lists = lists;
}

public Map<String, String> getMaps()
{
return maps;
}

public void setMaps(Map<String, String> maps)
{
this.maps = maps;
}

public Properties getProps()
{
return props;
}

public void setProps(Properties props)
{
this.props = props;
}
@Override
public void save(User u)
{
System.out.println("a user saved!");
}
@Override
public String toString()
{
return "sets.size:" + sets.size() + " lists.size:" + lists.size()
+ " maps.size:" + maps.size() + " props.size:" + props.size();
}
}
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- a service object; we will be profiling its methods -->
<bean name="u" class="com.bebig.dao.impl.UserDAOImpl">
<!-- set -->
<property name="sets">
<set>
<value>1</value>
<value>2</value>
</set>
</property>
<!-- list -->
<property name="lists">
<list>
<value>a</value>
<value>b</value>
</list>
</property>
<!-- map -->
<property name="maps">
<map>
<entry key="1" value="aa"></entry>
<entry key="2" value="bb"></entry>
</map>
</property>
<!-- properties -->
<property name="props">
<props>
<prop key="a">haha</prop>
<prop key="b">hi</prop>
</props>
</property>
</bean>
<bean id="userService" class="com.bebig.service.UserService"
scope="prototype">
<constructor-arg>
<ref bean="u" />
</constructor-arg>
</bean>
<!-- this switches on the load-time weaving -->
<!-- <context:load-time-weaver /> -->
</beans>
