org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'analyzeDataServiceImp' defined in file [E:\xxxx-xxxxx\源代码\XXXX\XXX-service-xxx\target\XXX-XXXX-XXX\WEB-INF\classes\com\zxxx\XXX\serviceImp\AnalyzeDataServiceImp.class]: Initialization of bean failed; nested exception is java.lang.RuntimeException: by java.lang.ClassFormatError: Method "<init>" in class com/alibaba/dubbo/common/bytecode/Wrapper0 has illegal signature "(V)V
今日做dubbo架构写接口的时候,因为只写了业务层的实现方法,没有写业务,业务方法的返回值设置成了void,在启动项目测试的时候出现了Error creating bean with name 'analyzeDataServiceImp' defined in file,无法创建。
因为dubbo框架是一个比较成熟的框架,它为了防止空指针,所以就做了异常抛出。
解决办法:设置业务层返回值,切记返回值不要用void,不要用void,不要用void,小白经验。
希望对你有帮助,来自Java路上小白的经验分享