:: Spring Boot :: (v2.0.2.RELEASE)
2018-06-05 17:29:50.692 INFO 6608 --- [ main] com.example.demo.DemoApplication : Starting DemoApplication on LIDA with PID 6608 (E:\Downloads\demo\target\classes started by Administrator in E:\Downloads\demo) 2018-06-05 17:29:50.698 INFO 6608 --- [ main] com.example.demo.DemoApplication : No active profile set, falling back to default profiles: default 2018-06-05 17:29:50.778 INFO 6608 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@6b1274d2: startup date [Tue Jun 05 17:29:50 CST 2018]; root of context hierarchy 2018-06-05 17:29:52.002 WARN 6608 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restTemplateBuilder' defined in class path resource [org/springframework/boot/autoconfigure/web/client/RestTemplateAutoConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.boot.web.client.RestTemplateBuilder] from ClassLoader [sun.misc.Launcher$AppClassLoader@73d16e93] 2018-06-05 17:29:52.004 INFO 6608 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown 2018-06-05 17:29:52.015 INFO 6608 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2018-06-05 17:29:52.025 ERROR 6608 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restTemplateBuilder' defined in class path resource [org/springframework/boot/autoconfigure/web/client/RestTemplateAutoConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.boot.web.client.RestTemplateBuilder] from ClassLoader [sun.misc.Launcher$AppClassLoader@73d16e93] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE] at com.example.demo.DemoApplication.main(DemoApplication.java:15) [classes/:na] Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.boot.web.client.RestTemplateBuilder] from ClassLoader [sun.misc.Launcher$AppClassLoader@73d16e93] at org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:758) ~[spring-core-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.util.ReflectionUtils.doWithLocalFields(ReflectionUtils.java:690) ~[spring-core-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.buildResourceMetadata(CommonAnnotationBeanPostProcessor.java:355) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.findResourceMetadata(CommonAnnotationBeanPostProcessor.java:339) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:298) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1020) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE] ... 14 common frames omitted Caused by: java.lang.NoClassDefFoundError: Lorg/springframework/http/client/support/BasicAuthorizationInterceptor; at java.lang.Class.getDeclaredFields0(Native Method) ~[na:1.8.0_121] at java.lang.Class.privateGetDeclaredFields(Class.java:2583) ~[na:1.8.0_121] at java.lang.Class.getDeclaredFields(Class.java:1916) ~[na:1.8.0_121] at org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:753) ~[spring-core-5.0.6.RELEASE.jar:5.0.6.RELEASE] ... 20 common frames omitted Caused by: java.lang.ClassNotFoundException: org.springframework.http.client.support.BasicAuthorizationInterceptor at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_121] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_121] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_121] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_121] ... 24 common frames omitted
1
wenzhoou 2018-06-05 18:14:05 +08:00 via Android
这么多人都是 TL;DS
|
2
night98 2018-06-05 18:17:07 +08:00
重新导包试一下,信息太少无法排查。
|
6
wenzhoou 2018-06-05 21:25:43 +08:00 via Android
你只要把上面的 stack trace 重新排版一下就有不少人帮你。这个不排版拿手机真没法看啊。
|
7
mringg 2018-06-05 22:07:04 +08:00 via iPhone
ClassNotFoundException: org.springframework.http.client.support.BasicAuthorizationInterceptor
如果异常信息全,那么是这触发的 |
10
xuuuu 2018-06-06 08:46:04 +08:00 via Android
自己创建个 bean 把这个对象 new 出来返回
|
11
neuliuxi 2018-06-06 11:50:32 +08:00
: No active profile set, falling back to default profiles: 有可能是这个问题吗
|
12
maxiaofeng 2018-06-06 18:35:34 +08:00
看到楼上的这句,,‘: No active profile set, falling back to default profiles:’
我推测是:没有加载到 远程 git 配置中心的配置文件。 |
13
jack80342 2018-06-13 23:33:23 +08:00
这几天翻译了最新的 Spring Boot 2.0 的英文文档,欢迎 Fork,https://www.gitbook.com/book/jack80342/spring-boot/details
|