java.lang.IllegalArgumentException: @Service interfaceClass() or interfaceName() or interface class must be present! 75 at org.springframework.util.Assert.notNull(Assert.java:201) 76 at org.apache.dubbo.config.spring.util.DubboAnnotationUtils.resolveInterfaceName(DubboAnnotationUtils.java:108) 77 at org.apache.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationPostProcessor.processScannedBeanDefinition(ServiceAnnotationPostProcessor.java:337) 78 at org.apache.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationPostProcessor.scanServiceBeans(ServiceAnnotationPostProcessor.java:237) 79 at org.apache.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationPostProcessor.postProcessBeanDefinitionRegistry(ServiceAnnotationPostProcessor.java:155) 80 at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311) 81 at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:142) 82 at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:746)
场景:
服务器启动的时候报错
原因:
缺少接口类:使用@Service
注解的类没有指定要实现的接口。
解决方案:
使用@Service
注解的类实现对应接口,或者不用@Service
注解