前些天發現了一個巨牛的人工智能學習網站,通俗易懂,風趣幽默,忍不住分享一下給大家。點擊跳轉到教程。
這幾天把以前網上看的視頻的源代碼拷貝到eclipse下面進行學習,當時用的是eclipse-jee-neon-M4a-win32-x86_64這個版本的eclipse,因為它本身集合了web開發插件,誰知道弄好后,發現他需要運行在java8的版本下面,后來就下載安裝java8,誰知道一切準備就緒后,發現我的項目無法運行,一直再報
嚴重: Context initialization failed
java.lang.IllegalArgumentException
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:52)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
。。。。
這個錯,我一直在網上找后來找到了答案
http://stackoverflow.com/questions/24128045/spring-context-initialization-failed-with-java-lang-illegalargumentexception-whi
后來我才知道,這個項目因為應用了spring 框架,但是這個框架如果想在java8下面開發使用,就必須使用spring 4.0以上的版本,否則就會報錯。
所以解決方案兩種,要么讓自己項目中的所有spring的jar包換成4.0以上的,要么就是更換eclipse版本,同時使用java7以及以下的版本來編譯運行項目
?