Cannot understand why this method is unresolved
It looks like this book just contains an error, it does not list the filterByType()
method. It's not a Spring method. Here you go:
private List<Ingredient> filterByType(List<Ingredient> ingredients, Type type) { return ingredients.stream() .filter(x -> x.getType().equals(type)) .collect(Collectors.toList());}
Source: Manning Publications