c828a0d973c37d2a
c828a0d973c37d2a
https://github.com/dangdangdotcom/dubbox/tree/dubbox-2.8.3/dubbo-simple/dubbo-monitor-simple 是的,(我只是个路人
@kimmking junit中不能使用@Reference注解
@kimmking ``` ----------------- spring: @Component("spirngbean") --------------------- junit @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("cfg.xml")// 里面扫描到上面的类 class DemoTest { @Autowired private spirngbean;//这里的bean是可以注入的 @Test public void test(){ } } -------------------- ``` ``` --------------- dubbo(在消费者项目中不会有AnnotationAction这样的类来设入@Reference) @com.alibaba.dubbo.config.annotation.Service demoServiceImpl implements...
@kimmking 可以当然是可以咯,就是麻烦,先定义一个类AnnotationAction (@Component)去设入annotationService(@Reference),junit中取得AnnotationAction 然后再去测试annotationService,不能**不写AnnotationAction ,junit中直接取得annotationService**(在使用@com.alibaba.dubbo.config.annotation.Service注解的情况下) ``` @Component("annotationAction") public class AnnotationAction { @Reference private AnnotationService annotationService; public String doSayHello(String name) { return annotationService.sayHello(name); } } ```
之前是因为我把Filter写在公用项目里了,而且也配置了com.alibaba.dubbo.rpc.Filter文件 找到解决方法了,就是com.alibaba.dubbo.rpc.Filter文件由各个项目去设置就可以了
@FrankBian @kimmking https://github.com/YanXs/dubbo3
我这情况是:相同的消费端代码,用最新git代码dubbox-master报错,用dubbox-2.8.4可以正常运行。 ---------------------------------------------------------- com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method ***** in the service com.*************nfoService. Tried 3 times of the providers [192.168.100.12:20890] (1/1) from the registry 192.168.20.152:2181 on the consumer 192.168.56.1 using...
@csdnshyang 是回复我么?
聚簇/非聚簇 有啥优缺点吗?