1. java.lang.reflect.Method
o // UserService instrance,
refObject // class instrance, eg UserDAOImpl (implement UserDAO)
methodName = "setUserDAO"; //
Method m = o.getClass().getMethod(methodName, refObject.getClass().getInterfaces()[0]);
m.invoke(o, refObject); // = o.setUserDAO(refObject);
2. add User Libraries
eclipse: window->reference->Java->Build Path->User Libraries
New-> libName -> Ok
select libName->add JARs...(spring\dist\....jar)-> ok
3. add user libraries
select project->Build Path->add libraries->user library-> ...select it -> OK