Reputation: 1076
I am new to Java Spring Framework, and for some reason when I try to run this class I get a ClassCastException error. the three files of spring/main method, the secondary class and the Beans.xml screenshots are below. what am I doing wrong?
Upvotes: 0
Views: 780
Reputation: 69460
Your bean declaration in the xml is wrong. it must be:
<bean id="helloWorld" class="spring.test.HelloWorld"/>
^^^^^^
HelloSpring
is your main class. HelloWorld
is your bean class.
Upvotes: 1