You can use the ApplicationContext#getBean(String name, Object ... params) method, which
Allows for specifying explicit constructor arguments / factory method arguments, overriding the specified default arguments (if any) in the bean definition.
For example:
Integer param1 = 2;
String param2 = "test";
Double param3 = 3.4;
Employee2 emp =
(Employee2)applicationContext.getBean("emp2", param1, param2, param3);
Anyway, while this will possibly work, you should consider using Spring EL, as noted in one of the comments under the question.