IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.
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.相关推荐
- Failed to introspect annotated methods on class 异常
用@enable时出现错误 Failed to introspect annotated methods on class 很可能是库和springboot版本不一致 转载于:https://www. ...
- ava.lang.IllegalStateException: Failed to introspect Class [xxxxxxxxImpl] from ClassLoader-Autowired
1.去掉相关类 如RestClientSupport 2.引入依赖(通过bns,去查已有相关依赖的其他项目.jar包的pom.xml中有版本号) Caused by: java.lang.ClassN ...
- IDEA| java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context
问题:java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context.pr ...
- Caused by: java.lang.IllegalStateException: Failed to introspect Class
Spring-Data-ElasticSearch整合spring boot问题 Caused by: java.lang.IllegalStateException: Failed to intro ...
- eureka client无法启动,java.lang.IllegalStateException: Failed to introspect Class
报错异常: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.netflix ...
- java.lang.IllegalStateException: Failed to introspect Class
异常内容 [org.springframework.web.context.support.XmlWebApplicationContext][Exception encountered during ...
- 【spring_Cloud】java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud
java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.netflix.eurek ...
- 异常解决:java.lang.IllegalStateException: Failed to introspect Class
java.lang.IllegalStateException: Failed to introspect Class 异常详情 原因 解决办法 异常详情 Exception encountered ...
- 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 ...
- java.lang.IllegalStateException: Failed to introspect Class报错原因和解决办法
这个报错其实就是没有找到要加载的类,一般在启动的时候报错. 加载不到的类有两种情况,一种是直接找不到要加载的依赖包,或者添加了依赖包后没有加载进入,需要看看是不是 maven 的设置问题,重新刷新加载 ...
最新文章
- 2017-2018 ACM-ICPC, NEERC, Southern Subregional Contest
- 六面!终斩腾讯NLP暑期实习offer
- mysql防止索引崩溃_MySQL优化之避免索引失效的方法
- Linux系统文件I/O编程(一)---open()等基本函数
- python——字符串常用方法
- 3.13. Notepad++中Windows,Unix,Mac三种格式之间的转换
- SVN interrupted与already-locked 解决方法
- linux centos7杀进程,centos7 nginx 启动/进程状态/杀掉进程
- 支付宝五福java_支付宝五福奖金翻倍!有人拿了5328元!今天最高能翻18倍,你拿到多少?...
- mysql 自定义函数 事务_MySQL存储过程、触发器、自定义函数、事务
- 移动端UL列表无法平滑向下滚动问题
- 一键配置以太网IP脚本
- 列出5个python标准库_5个常用 Python 标准库
- flask-uploads文件上传
- SMPL 人体模型简要
- java wgs84 百度坐标,百度坐标转WGS84(即GPS)坐标
- 【已解决】TF_REPEATED_DATA ignoring data with redundant timestamp for frame
- win10怎么改文件后缀_怎么显示win10系统隐藏文件夹
- 一个优秀IT专家的成长历程---献给所有的颓废或..
- 思想的芦苇——把过程改进注入人文服务的思想以提升其价值