.   ____          _            __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.1.RELEASE) [ INFO ] [2017-11-03 14:50:17:017] com.taikang.Application [48] [main]- Starting Application on WMM with PID 4384 (started by Administrator in G:\workspace-s\IdeaProjects\hello)
[ INFO ] [2017-11-03 14:50:17:017] com.taikang.Application [665] [main]- The following profiles are active: DEV
[ INFO ] [2017-11-03 14:50:17:017] org.hibernate.validator.internal.util.Version [30] [background-preinit]- HV000001: Hibernate Validator 5.2.4.Final
[ INFO ] [2017-11-03 14:50:18:018] org.springframework.context.annotation.AnnotationConfigApplicationContext [581] [main]- Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@bdd8f7: startup date [Fri Nov 03 14:50:18 CST 2017]; root of context hierarchy
[ WARN ] [2017-11-03 14:50:18:018] org.springframework.context.annotation.AnnotationConfigApplicationContext [549] [main]- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.taikang.Application]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.support.SpringBootServletInitializer
Disconnected from the target VM, address: '127.0.0.1:60450', transport: 'socket'
[ ERROR] [2017-11-03 14:50:18:018] org.springframework.boot.SpringApplication [839] [main]- Application startup failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.taikang.Application]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.support.SpringBootServletInitializer
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:187)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:324)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:246)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:273)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:98)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:681)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:523)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
at com.taikang.Application.main(Application.java:36)
Caused by: java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.support.SpringBootServletInitializer
at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:163)
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:301)
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:237)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:204)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:173)
... 12 common frames omitted
Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletContext
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
at java.lang.Class.getDeclaredMethods(Class.java:1860)
at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:152)
... 16 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContext
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 20 common frames omitted Process finished with exit code 1

解决方法:

pom.xml中的

In maven, I changed the scope like this: <scope>provided</scope> to <scope>compile</scope> and it worked!!. 

springboot 启动报错 java.lang.IllegalStateException: Failed to introspect annotated methods on class org的更多相关文章

  1. springboot测试启动报错java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

    springboot测试启动报错: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you ne ...

  2. eclipse启动报错java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' befo

    报错: java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invo ...

  3. Idea 的Test测试报错:java.lang.IllegalStateException: Failed to load ApplicationContext

    因为在Test里面使用了注解@Autowired 引入来至bean.xml文件的内容 ,而在Test没有没有办法自动引入,需要在Test类上加上注解 @ContextConfiguration(loc ...

  4. MQ报错java.lang.IllegalStateException: Failed to load ApplicationContext

    这个问题是jdk版本造成的,把jdk1.8换成jdk1.7问题就解决了

  5. maven web 项目中启动报错 Java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

    主要原因是maven项目里面的jar包吗,没有导入到项目中 maven web 项目中启动报错 Java.lang.ClassNotFoundException: org.springframewor ...

  6. 云笔记项目- 上传文件报错"java.lang.IllegalStateException: File has been moved - cannot be read again"

    在做文件上传时,当写入上传的文件到文件时,会报错“java.lang.IllegalStateException: File has been moved - cannot be read again ...

  7. 解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level

    解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level 学习了:https://blog.csdn. ...

  8. 异常解决:java.lang.IllegalStateException: Failed to introspect Class

    java.lang.IllegalStateException: Failed to introspect Class 异常详情 原因 解决办法 异常详情 Exception encountered ...

  9. Eclipse------使用Debug As时报错java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file:/XXX

    报错信息: java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file ...

随机推荐

  1. 前端框架VUE----指令

    一.什么是VUE? 它是构建用户界面的JavaScript框架(让它自动生成js,css,html等) 二.怎么使用VUE? 1.引入vue.js 2.展示HTML <div id=" ...

  2. 发布webservice服务

    1,定义一个接口 public interface HaiService { //定义一个方法 String speak(String str); } 2,编写一个实现类 import javax.j ...

  3. MySql安装和基本管理

    一.什么是数据库? mysql就是一个基于socket编写的C/S架构的软件 MySQL是一个关系型数据库管理系统,由瑞典MySQL AB 公司开发,目前属于 Oracle 旗下公司.MySQL 最流 ...

  4. go开发工具及安装使用(Liteide)Liteide-centos6.8 安装

    开发工具介绍 LiteIDE https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/zh_CN/readme. ...

  5. 3、pandas的loc和iloc数据筛选

    选择列: 选择一列: 选择多列(选择的内容变成list,也就是要两个方括号): 选择一行或多行(loc函数): 选择连续的行(以索引标签为选择参数): 选择非连续的行(以索引标签为选择参数): 选择包 ...

  6. 导入maven项目各个注解均报错了

    所遇问题: 导入maven项目各个注解均报错了; 思考1: 这个项目使用了springboot;spring是个”大容器”,所有对象的创建和管理都交给了它, (SpringBoot是一个框架,一种全新 ...

  7. Codeforces Round #439 (Div. 2) Problem E (Codeforces 869E) - 暴力 - 随机化 - 二维树状数组 - 差分

    Adieu l'ami. Koyomi is helping Oshino, an acquaintance of his, to take care of an open space around ...

  8. OpenJudge cdqz/Data Structure Challenge 2 (Problem 5822) - 可持久化线段树

    描述 给一个空数列,有M次操作,每次操作是以下三种之一: (1)在数列后加一个数 (2)求数列中某位置的值 (3)撤销掉最后进行的若干次操作(1和3) 输入 第一行一个正整数M. 接下来M行,每行开头 ...

  9. centos 7.2 安装gitlab汉化

    ####################你如果搜到我的这个博客,你的系统得是centos 7的   80端口没有占用.  QQ:1394466404   这个博客维护1年 #### 多地方第一个是百度 ...

  10. topcoder srm 535 div1

    problem1 link 对于每个质因子$p$,枚举其出现的最少次数以及最多次数分别在哪个数字中. problem2 link 分数规划.题目是求$\frac{3600K+\sum_{i=0}^{K ...