I have a Class that accepts the following constructor
public Student(int id, String name, Map<String, List<String>> mapInject) { super(); this.id = id; this.name = name; this.mapInject = mapInject; } And from spring Java Config, I am injecting the constructor args like below..
@Configuration public class JavaConfig { @Bean public Employee getEmployeeBean() { Map<String,List<String>> mapInject = new HashMap<String,List<String>>(); //Add map element return new Employee(3123,"John",mapInject); } } Is this the right way?