【Spring】Bean instantiation via constructor failed nested exception Constructor threw exception

x33g5p2x  于2022-03-04 转载在 Spring  
字(0.6k)|赞(0)|评价(0)|浏览(195)

1.概述

我今天一个程序报错依赖异常。错误信息如下 Caused by:UnsatisfiedDependencyException: Error creating bean with name 'extensionServiceImpl': Unsatisfied dependency expressed through field 'zkService'; nested exception is BeanCreationException: Error creating bean with name 'zkService' defined in URL [xxx.jar!/xxx/ZkService.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.dbapp.baas.monitor.infrastructure.ZkService]: Constructor threw exception; nested exception is java.lang.NullPointerException

先说一下我的代码结构

原本的代码结构如下。

相关文章

微信公众号

最新文章

更多