次の違いは何ですか:
public class GameController implements Serializable{
@ManagedProperty(value="#{Gamebean}")
private Game game;
と
public class GameController implements Serializable{
private Game game;
public GameController(){
game =(Game)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("Gamebean");
}
違いがない場合、どの方法が優れていますか?乾杯。