多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
### bean ~~~ public class UserService { private String[] strs; private List<String> list; private Set<String> set; private Map<String, String> map; private Properties properties; public void setStrs(String[] strs) { this.strs = strs; } public void setList(List<String> list) { this.list = list; } public void setSet(Set<String> set) { this.set = set; } public void setMap(Map<String, String> map) { this.map = map; } public void setProperties(Properties properties) { this.properties = properties; } @Override public String toString() { return "UserService{" + "strs=" + Arrays.toString(strs) + ", list=" + list + ", set=" + set + ", map=" + map + ", properties=" + properties + '}'; } } ~~~ ### bean.xml ~~~ <bean name="userService" class="com.test.service.UserService"> <property name="strs"> <array> <value>aaa</value> <value>bbb</value> <value>ccc</value> </array> </property> <property name="list"> <array> <value>111</value> <value>222</value> <value>333</value> </array> </property> <property name="set"> <list> <value>sss</value> <value>sss</value> </list> </property> <property name="map"> <map> <entry key="name" value="test"></entry> </map> </property> <property name="properties"> <props> <prop key="age">11</prop> </props> </property> </bean> ~~~