IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.servlet.support.SpringBootServletInitializer

打包成jar包运行报错,报错如下:

说的是找不到这个什么类,于是去jar中检查,发现org.springframework.boot.web.servlet.xxxxx在jar中已经有了,于是向下检查发现缺少javax.servletxxxx包
解决方法:
修改piom.xml文件,将<scope>provided</scope> 改为 <scope>compile</scope> 即可

改为

该问题解决。
从另外一个贴看到关于scope 的描述 :
原文链接:https://blog.csdn.net/qq_26003101/article/details/125288367
其中scope属性值为provided,对于scope属性的可选值释义如下:

  • compile (编译):为默认范围,其意义在于默认没有提供一个范围,则该项目依赖的范围就是编译范围。使用该值会导致编译范围依赖在所有的classpath中是可用的,同时在打包时候将包含这些依赖;
  • provided (已提供):依赖只有在当JDK 或者一个容器已提供该依赖之后才使用。例如, 如果你开发了一个web 应用,你可能在编译 classpath 中需要可用的Servlet API 来编译一个servlet,但是你不会想要在打包好的WAR 中包含这个Servlet API;这个Servlet API JAR 由你的应用服务器或者servlet 容器提供。已提供范围的依赖在编译classpath (不是运行时)可用。它们不是传递性的,也不会被打包;
  • runtime (运行时):依赖在运行和测试系统的时候需要,但在编译的时候不需要。比如,你可能在编译的时候只需要JDBC API JAR,而只有在运行的时候才需要JDBC
    驱动实现;
  • test (测试):范围依赖 在一般的编译和运行时都不需要,它们只有在测试编译和测试运行阶段可用;

IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.相关推荐

  1. Failed to introspect annotated methods on class 异常

    用@enable时出现错误 Failed to introspect annotated methods on class 很可能是库和springboot版本不一致 转载于:https://www. ...

  2. ava.lang.IllegalStateException: Failed to introspect Class [xxxxxxxxImpl] from ClassLoader-Autowired

    1.去掉相关类 如RestClientSupport 2.引入依赖(通过bns,去查已有相关依赖的其他项目.jar包的pom.xml中有版本号) Caused by: java.lang.ClassN ...

  3. IDEA| java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context

    问题:java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context.pr ...

  4. Caused by: java.lang.IllegalStateException: Failed to introspect Class

    Spring-Data-ElasticSearch整合spring boot问题 Caused by: java.lang.IllegalStateException: Failed to intro ...

  5. eureka client无法启动,java.lang.IllegalStateException: Failed to introspect Class

    报错异常: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.netflix ...

  6. java.lang.IllegalStateException: Failed to introspect Class

    异常内容 [org.springframework.web.context.support.XmlWebApplicationContext][Exception encountered during ...

  7. 【spring_Cloud】java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud

    java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.netflix.eurek ...

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

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

  9. Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.mchange.v2.c3p0.ComboPoo

    主要问题:Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.mchange.v2.c3p0.Com ...

  10. java.lang.IllegalStateException: Failed to introspect Class报错原因和解决办法

    这个报错其实就是没有找到要加载的类,一般在启动的时候报错. 加载不到的类有两种情况,一种是直接找不到要加载的依赖包,或者添加了依赖包后没有加载进入,需要看看是不是 maven 的设置问题,重新刷新加载 ...

最新文章

  1. 2017-2018 ACM-ICPC, NEERC, Southern Subregional Contest
  2. 六面!终斩腾讯NLP暑期实习offer
  3. mysql防止索引崩溃_MySQL优化之避免索引失效的方法
  4. Linux系统文件I/O编程(一)---open()等基本函数
  5. python——字符串常用方法
  6. 3.13. Notepad++中Windows,Unix,Mac三种格式之间的转换
  7. SVN interrupted与already-locked 解决方法
  8. linux centos7杀进程,centos7 nginx 启动/进程状态/杀掉进程
  9. 支付宝五福java_支付宝五福奖金翻倍!有人拿了5328元!今天最高能翻18倍,你拿到多少?...
  10. mysql 自定义函数 事务_MySQL存储过程、触发器、自定义函数、事务
  11. 移动端UL列表无法平滑向下滚动问题
  12. 一键配置以太网IP脚本
  13. 列出5个python标准库_5个常用 Python 标准库
  14. flask-uploads文件上传
  15. SMPL 人体模型简要
  16. java wgs84 百度坐标,百度坐标转WGS84(即GPS)坐标
  17. 【已解决】TF_REPEATED_DATA ignoring data with redundant timestamp for frame
  18. win10怎么改文件后缀_怎么显示win10系统隐藏文件夹
  19. 一个优秀IT专家的成长历程---献给所有的颓废或..
  20. 思想的芦苇——把过程改进注入人文服务的思想以提升其价值

热门文章

  1. Mac查看端口号占用
  2. 基于javaEE的超市库存管理系统
  3. 工欲善其事,必先利其器——学会不将就,让自己事半功倍!
  4. docker安装,阿里云镜像配置
  5. SQL 注入速查表大全
  6. 2020.9.8:Spring cloud :install时报错
  7. python mysqldb 安装_python MySQLdb在windows环境下的快速安装、问题解决方式
  8. 一级计算机页码居中,word中页码为何不能同时居中
  9. RedTiger‘s Hackit
  10. python浪漫告白源代码_python七夕浪漫表白源码