package com.anno.ex02;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

@Component("myFood")
public class MyFood {
	
	@Resource(name="favorite")
	private Food favoriteFood;
	
	@Resource(name="unfavorite")
	private Food unfavoriteFood;

	public Food getFavoriteFood() {
		return favoriteFood;
	}

	public void setFavoriteFood(Food favoriteFood) {
		this.favoriteFood = favoriteFood;
	}

	public Food getUnfavoriteFood() {
		return unfavoriteFood;
	}

	public void setUnfavoriteFood(Food unfavoriteFood) {
		this.unfavoriteFood = unfavoriteFood;
	}

	@Override
	public String toString() {
		return "[favoriteFood=" + favoriteFood + "- unfavoriteFood=" + unfavoriteFood + "]";
	}
	
	
}