2017-10-17 11:39:01 163 - org.springframework.web.context.ContextLoader -0
[localhost-startStop-1] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
java.lang.IllegalArgumentExceptionat 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.doProcessConfigurationClass
(ConfigurationClassParser.java:230)
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass
(ConfigurationClassParser.java:153)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions
(ConfigurationClassPostProcessor.java:285)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry
(ConfigurationClassPostProcessor.java:223)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors
(AbstractApplicationContext.java:630)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)at java.lang.Thread.run(Thread.java:748)
这个看起来根本不知道错误原因的错误很可能是因为JDK的版本与spring的包冲突了,
像我就是本来工作空间的JDK默认版本是1.7,后来玩springboot改成1.8,之前spring的包大
部分都是3.2.0版本的项目启动就报这个错了,然后再把JDK改回为1.7就好了。