今天在启动时报了下面这个错误
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.fangjia.api.client.auth.AuthRemoteClient': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.fangjia.api.client.auth.AuthRemoteClient': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.fangjia.api.client.auth.AuthRemoteClient': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name java.lang.StackOverflowError
... 1024 common frames omitted
从错误信息看的出是递归导致的,而我这边报错的点是Feign调用的地方
最后排查下来发现是@FeignClient中fallback的值配置错了,应该配置接口的实现类,而我这边配置的就是接口本身,所以导致了递归调用。
网友评论