Hi
I've been reading up on Spring lately and it looks quite nice, but lets say I want to do someting like this
Is it possible to pass 'user' and 'role' to a constructor of a prototype bean? Is there a way to do it cleany in without knowning the implementation, except maybe in configuration files of Spring?!Code:public interface AddRoleCommand { public void execute(); } public class AddRoleCommandImpl implements AddRoleCommand { private Person user; private Role role; public AddRoleCommandImpl (Person user, Role role) { this.user = user; this.role = role; } public void execute() { // do some checks // do the real stuff } }
Thanks


Reply With Quote