2012-02-08 10 views
0

でアプリケーションを初期化した後nullであります CrudRepositoryこれはモンゴ-config.xmlのの一部であり、春

マイカテゴリービーンズは

01ですここでCategoryBean

@PostConstruct 
public void init() { 
    selectedCategory = new Category(); 
    categoryList = (List<Category>) categoryRepository.findAll(); 
    deleteCategoryList = new ArrayList<Category>(); 
    userLocaleList = new ArrayList<Locale>(); 
    userLocaleList.add(new Locale("tr")); 
    userLocaleList.add(new Locale("en")); 
    isForUpdate = false; 
} 

categoryRepositoryのPostConstructで はnullです。理由は何ですか?なぜ自動配線が機能していないのですか?

答えて

0

@ControllerをパブリッククラスCategoryBeanに追加すると、Serializableが問題を解決します。

関連する問題