Skip to content

Commit

Permalink
evolve(annotation): annotation - setter injection
Browse files Browse the repository at this point in the history
  • Loading branch information
chengcyber committed Dec 26, 2017
1 parent 2b007d7 commit 8958b72
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ public class TennisCoach implements Coach {

private FortuneService fortuneService;

// @Autowired
// public TennisCoach(FortuneService theFortuneService) {
// fortuneService= theFortuneService;
// }

@Autowired
public TennisCoach(FortuneService theFortuneService) {
fortuneService= theFortuneService;
public void setFortuneService(FortuneService fortuneService) {
this.fortuneService = fortuneService;
}

@Override
Expand Down

0 comments on commit 8958b72

Please sign in to comment.