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.
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.