refactored and made the tests work

This commit is contained in:
thombergs
2020-03-25 06:06:04 +11:00
parent ca32144e80
commit 01db1e9805
9 changed files with 25 additions and 43 deletions

View File

@@ -7,15 +7,13 @@ import org.springframework.stereotype.Component;
public class Pizza {
@Autowired
Topping toppings;
private Topping toppings;
Pizza(Topping toppings) {
this.toppings = toppings;
}
@Autowired
public Topping getToppings() {
System.out.println("Using field injection - " + this.toppings);
return toppings;
}