File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/com/luv2code/springdemo Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public static void main(String[] args) {
1010 ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext ("applicationContext.xml" );
1111
1212// Retrieve the bean from Spring container
13- Coach coach = context .getBean ("thatSillyCoach " , Coach .class );
13+ Coach coach = context .getBean ("tennisCoach " , Coach .class );
1414
1515// Call methods on the bean
1616 System .out .println (coach .getDailyWorkout ());
Original file line number Diff line number Diff line change 66 * @Component - To find Spring within the component scan that which classes are beans
77 * thatSillyCoach - bean id
88 */
9- @ Component ( "thatSillyCoach" )
9+ @ Component
1010public class TennisCoach implements Coach {
1111
1212 @ Override
You can’t perform that action at this time.
0 commit comments