02 Practice Activity Di XML PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Spring and Hibernate for Beginners

Practice Activity #2

Dependency Injection with XML Configuration

1. Define a new implementation for the FortuneService.


a. Your fortune service should define three fortunes in an array.
b. When the getFortune() method is called it should return a random fortune
from the array.

2. Inject your new dependency into your Coach implementation.

3. Test your application to verify you are retrieving random fortunes.

www.luv2code.com

You might also like