我是Spring的新手,並使用Eclipse出去學習here的Spring教程。Spring:無法導入庫
但是,在Eclipse中我無法導入這兩個庫
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
我甚至從Spring網站下載的春源文件,包括它的系統庫表示,它在我的項目,並在lib我的項目文件夾,但沒有徒勞。
你能幫我解決問題到底在哪裏嗎?請給我一些好的Spring教程網站。
謝謝大家
編輯
這是基於註釋例外
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
ApplicationContext cannot be resolved to a type
ClassPathApplicationContext cannot be resolved to a type
at com.test.App.main(App.java:12)
你包括JAR,以及源?這是真正重要的。 –
這不是spring的問題,你不能在eclipse中導入他們的類。將jar添加到您的項目中,然後重新啓動eclipse。我建議閱讀Spring in Action 3.0。手動導入兩個類時是否收到編譯錯誤? –
@PaulBellora是我沒有包括的罐子文件,並重新啓動甚至但無濟於事 – sameer