How to do it...

Perform the following steps to auto-wire Collections and Properties components:

  1. For both of the projects involved in the preceding recipes, create the following model classes inside their own package org.packt.starter.ioc.model:
public class ListEmployees { private List<Employee> listEmps; private List<String> listEmpNames; // getters and setters } public class SetDepartments { private Set<Department> setDepts; private Set<String> deptNames; // getters and setters } public class MapEmpTasks { private Map<String, Employee> mapEmpTask; private Map<String,String> mapEmpMgr; // getters and setters } public class PropertiesAudition { private Properties auditionAddress; private Properties auditonRequirement; // getters and setters ...

Get Spring 5.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.