1,导入dubbo的包alibaba的。而不是jdk的
<!-- dubbo 整合 spring-boot --> <dependency> <groupId>com.alibaba.boot</groupId> <artifactId>dubbo-spring-boot-starter</artifactId> <version>0.2.0</version> </dependency>
2启动类开启@EnableDubbo注解
3,最后的最后,我是卡这里好久,执行mvn clean删除所有的jar包。