启动eureka项目时报错,报错信息如下:
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.xxx.EurekaServerApplication]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.servlet.support.SpringBootServletInitializer

解决方法:将对应服务下的provided修改为compile

******scope******
1.compile:默认范围,编译测试运行都有效 
2.provided:在编译和测试时有效 
3.runtime:在测试和运行时有效 
4.test:只在测试时有效 
5.system:在编译和测试时有效,与本机系统关联,可移植性差

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐