Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

can we inject multiple parameter in setter dependency in spring by xml or annotations

I have a class where i want to inject dependency.

Class UserProcess {private UserService userService;private RegisterUser registerUser;

public void getServices(UserService userService,RegisterUser registerUser){

  this.userService = userService;
  this.registerUser = registerUser;

} }

In XML: but in xml we uses separate property for separate dependency and their corresponding setter and getter.

I just want to know it is possible or not. if not then what is the reason if yes then how ?

Comments