Spring vs Java reflection

Viewed 14836

I need to create objects dynamically. I use Spring to create a map of class names. Now I can use

Spring ApplicationContext.getbean(className)

or

Java Class.forName(className).newInstance().

Which method is more efficient?

Thanks you.

3 Answers
Related