You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "lxil520 (via GitHub)" <gi...@apache.org> on 2024/01/17 03:28:46 UTC

[I] dubbo3.0之后injvm的协议模式找不到生产者 [dubbo]

lxil520 opened a new issue, #13672:
URL: https://github.com/apache/dubbo/issues/13672

   ### Environment
   
   * Dubbo version: 3.0+
   * Java version: 17
   
   ### 服务配置如下
   dubbo:
     application:
       logger: slf4j
       qos-enable: false
     consumer:
       check: false
       scope: local
     protocol:
       accepts: 200
       threadpool: cached
       threads: 200
       name: injvm
     provider:
       scope: local
     registry:
       address: N/A
     scan:
       base-packages: com.freedom.paas
   ### 报错信息
   org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilterFactoryBean' defined in class path resource [com/freedom/paas/framework/authentication/config/ShiroConfig.class]: Failed to instantiate [org.apache.shiro.spring.web.ShiroFilterFactoryBean]: Factory method 'shiroFilterFactoryBean' threw exception with message: Failed to invoke the method queryList in the service com.freedom.paas.rpc.system.admin.service.AdminPermissionService. No provider available for the service com.freedom.paas.rpc.system.admin.service.AdminPermissionService from registry Directory(invokers: 1[127.0.0.1], validInvokers: 0[], invokersToReconnect: 1[127.0.0.1]) on the consumer 192.168.3.10 using the dubbo version 3.3.0-beta.1. Please check if the providers have been started and registered.
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:657) ~[spring-beans-6.0.4.jar:6.0.4]
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:645) ~[spring-beans-6.0.4.jar:6.0.4]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1324) ~[spring-beans-6.0.4.jar:6.0.4]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.4.jar:6.0.4]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:561) ~[spring-beans-6.0.4.jar:6.0.4]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[spring-beans-6.0.4.jar:6.0.4]
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.4.jar:6.0.4]
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.4.jar:6.0.4]
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.4.jar:6.0.4]
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205) ~[spring-beans-6.0.4.jar:6.0.4]
   	at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:273) ~[spring-context-6.0.4.jar:6.0.4]
   	at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:761) ~[spring-context-6.0.4.jar:6.0.4]
   	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:568) ~[spring-context-6.0.4.jar:6.0.4]
   	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.0.2.jar:3.0.2]
   	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) ~[spring-boot-3.0.2.jar:3.0.2]
   	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) ~[spring-boot-3.0.2.jar:3.0.2]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-3.0.2.jar:3.0.2]
   	at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:150) ~[spring-boot-3.0.2.jar:3.0.2]
   	at com.freedom.paas.local.console.manager.NativeConsoleManagerMain.main(NativeConsoleManagerMain.java:19) ~[classes/:na]
   Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.spring.web.ShiroFilterFactoryBean]: Factory method 'shiroFilterFactoryBean' threw exception with message: Failed to invoke the method queryList in the service com.freedom.paas.rpc.system.admin.service.AdminPermissionService. No provider available for the service com.freedom.paas.rpc.system.admin.service.AdminPermissionService from registry Directory(invokers: 1[127.0.0.1], validInvokers: 0[], invokersToReconnect: 1[127.0.0.1]) on the consumer 192.168.3.10 using the dubbo version 3.3.0-beta.1. Please check if the providers have been started and registered.
   	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:171) ~[spring-beans-6.0.4.jar:6.0.4]
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-6.0.4.jar:6.0.4]
   	... 18 common frames omitted
   Caused by: org.apache.dubbo.rpc.RpcException: Failed to invoke the method queryList in the service com.freedom.paas.rpc.system.admin.service.AdminPermissionService. No provider available for the service com.freedom.paas.rpc.system.admin.service.AdminPermissionService from registry Directory(invokers: 1[127.0.0.1], validInvokers: 0[], invokersToReconnect: 1[127.0.0.1]) on the consumer 192.168.3.10 using the dubbo version 3.3.0-beta.1. Please check if the providers have been started and registered.
   	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.checkInvokers(AbstractClusterInvoker.java:370) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:73) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:344) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.router.RouterSnapshotFilter.invoke(RouterSnapshotFilter.java:46) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:108) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.support.MetricsClusterFilter.invoke(MetricsClusterFilter.java:59) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:53) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.spring.security.filter.ContextHolderParametersSelectedTransferFilter.invoke(ContextHolderParametersSelectedTransferFilter.java:41) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.metrics.filter.MetricsFilter.invoke(MetricsFilter.java:76) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.support.MetricsConsumerFilter.invoke(MetricsConsumerFilter.java:37) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.support.ConsumerClassLoaderFilter.invoke(ConsumerClassLoaderFilter.java:40) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.tracing.filter.ObservationSenderFilter.invoke(ObservationSenderFilter.java:57) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.support.ConsumerContextFilter.invoke(ConsumerContextFilter.java:116) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CallbackRegistrationInvoker.invoke(FilterChainBuilder.java:196) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$ClusterFilterInvoker.invoke(AbstractCluster.java:91) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:103) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.cluster.support.wrapper.ScopeClusterInvoker.invoke(ScopeClusterInvoker.java:163) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.proxy.InvocationUtil.invoke(InvocationUtil.java:61) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:75) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at com.freedom.paas.rpc.system.admin.service.AdminPermissionServiceDubboProxy2.queryList(AdminPermissionServiceDubboProxy2.java) ~[classes/:na]
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
   	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
   	at org.apache.dubbo.config.spring.util.LazyTargetInvocationHandler.invoke(LazyTargetInvocationHandler.java:58) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
   	at com.freedom.paas.rpc.system.admin.service.AdminPermissionServiceDubboProxy2.queryList(AdminPermissionServiceDubboProxy2.java) ~[classes/:na]
   	at com.freedom.paas.console.manager.system.admin.handler.SecurityManagerHandler.getAllPermission(SecurityManagerHandler.java:110) ~[classes/:na]
   	at com.freedom.paas.framework.authentication.config.ShiroConfig.shiroFilterFactoryBean(ShiroConfig.java:88) ~[classes/:na]
   	at com.freedom.paas.framework.authentication.config.ShiroConfig$$SpringCGLIB$$0.CGLIB$shiroFilterFactoryBean$3(<generated>) ~[classes/:na]
   	at com.freedom.paas.framework.authentication.config.ShiroConfig$$SpringCGLIB$$2.invoke(<generated>) ~[classes/:na]
   	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258) ~[spring-core-6.0.4.jar:6.0.4]
   	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-6.0.4.jar:6.0.4]
   	at com.freedom.paas.framework.authentication.config.ShiroConfig$$SpringCGLIB$$0.shiroFilterFactoryBean(<generated>) ~[classes/:na]
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
   	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
   	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:139) ~[spring-beans-6.0.4.jar:6.0.4]
   	... 19 common frames omitted
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Unable to find providers if switch to injvm protocol [dubbo]

Posted by "lxil520 (via GitHub)" <gi...@apache.org>.
lxil520 commented on issue #13672:
URL: https://github.com/apache/dubbo/issues/13672#issuecomment-1909285667

   是的,完全在同一份代码中,我用的springboot3.0, 然后消费者服务引入rpc的api定义和生产者服务本身,在原来springboot2.7.x和dubbo2.7.22的时候一直使用的好好的,因为项目原因现在计划升级到了springboot3.0发现dubbo必须升级3.0才支持,但是升级之后injvm的方式完全不能使用了,我们的管理后台使用的都是内部人员,所以采用的是injvm协议,而openapi走的注册中心方式


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Unable to find providers if switch to injvm protocol [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13672:
URL: https://github.com/apache/dubbo/issues/13672#issuecomment-1911589039

   > > 您是否在同一流程中导出了服务?
   > 
   > 是的,完全在同一个代码中,我用的springboot3.0,然后消费者服务引入rpc的api定义和生产者服务本身,在原来springboot2.7.x和dubbo2.7.22的时候一直使用的好好的,因为项目原因现在计划升级到了springboot3.0发现dubbo必须升级3.0才支持,但是升级之后在jvm的方式完全不能使用了,我们的管理后台使用的是都是内部人员,所以采用injvm协议,而openapi走的注册中心方式
   
   Please try on 3.2.10. If there is still error, pls submit a demo.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Unable to find providers if switch to injvm protocol [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ closed issue #13672: Unable to find providers if switch to injvm protocol
URL: https://github.com/apache/dubbo/issues/13672


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Unable to find providers if switch to injvm protocol [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13672:
URL: https://github.com/apache/dubbo/issues/13672#issuecomment-1895430704

   Have you exported the service in the same process?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Unable to find providers if switch to injvm protocol [dubbo]

Posted by "lxil520 (via GitHub)" <gi...@apache.org>.
lxil520 commented on issue #13672:
URL: https://github.com/apache/dubbo/issues/13672#issuecomment-1960974061

   > I think this issue doesn't need to be fixed. If this usage is really necessary, why not use ` @Service` instead?
   
   Our project needs to run in both private cloud and public cloud modes. However, in the private cloud scenario, where clients provide limited resources, it's insufficient to support the operation of microservices. Hence, we need the 'injvm' approach instead of using '@Service'.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Unable to find providers if switch to injvm protocol [dubbo]

Posted by "lxil520 (via GitHub)" <gi...@apache.org>.
lxil520 commented on issue #13672:
URL: https://github.com/apache/dubbo/issues/13672#issuecomment-1909285963

   > 您是否在同一流程中导出了服务?
   
   
   是的,完全在同一个代码中,我用的springboot3.0,然后消费者服务引入rpc的api定义和生产者服务本身,在原来springboot2.7.x和dubbo2.7.22的时候一直使用的好好的,因为项目原因现在计划升级到了springboot3.0发现dubbo必须升级3.0才支持,但是升级之后在jvm的方式完全不能使用了,我们的管理后台使用的是都是内部人员,所以采用injvm协议,而openapi走的注册中心方式


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Unable to find providers if switch to injvm protocol [dubbo]

Posted by "lxil520 (via GitHub)" <gi...@apache.org>.
lxil520 commented on issue #13672:
URL: https://github.com/apache/dubbo/issues/13672#issuecomment-1914177144

   > > > 您是否在同一流程中导出了服务?
   > > 
   > > 
   > > 是的,完全在同一个代码中,我用的springboot3.0,然后消费者服务引入rpc的api定义和生产者服务本身,在原来springboot2.7.x和dubbo2.7.22的时候一直使用的好好的,因为项目原因现在计划升级到了springboot3.0发现dubbo必须升级3.0才支持,但是升级之后在jvm的方式完全不能使用了,我们的管理后台使用的是都是内部人员,所以采用injvm协议,而openapi走的注册中心方式
   > 
   > Please try on 3.2.10. If there is still error, pls submit a demo.
   
   您好!根据要求我重新创建了一个新的项目,并完整复现了这个问题
   复现过程
   
   初始化项目并跟我的实际工程保持一致springboot 3.0.2, springCloud 2022.0.0, springCloudAlibaba 2022.0.0.0, dubbo 3.2.10
   简单创建三个模块:消费模块,微服务定义模块,生产模块
   简单写一个api demo发现injvm能正常访问
   加入实际项目的shiro模块,之前的逻辑是在shiro的shiroFilterFactoryBean的时候把系统所有的权限加载给shiro,此时就报错了,完整复现了我提到的问题找不到生产者
   demo地址在下面,直接运行demo-consumer模块下面的Main类就可以复现:
   https://github.com/lxil520/dubbo-injvm-demo
   
   谢谢


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Unable to find providers if switch to injvm protocol [dubbo]

Posted by "ShenFeng312 (via GitHub)" <gi...@apache.org>.
ShenFeng312 commented on issue #13672:
URL: https://github.com/apache/dubbo/issues/13672#issuecomment-1960960587

   I think this issue doesn't need to be fixed. If this usage is really necessary, why not use `
   @Service` instead?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Unable to find providers if switch to injvm protocol [dubbo]

Posted by "ShenFeng312 (via GitHub)" <gi...@apache.org>.
ShenFeng312 commented on issue #13672:
URL: https://github.com/apache/dubbo/issues/13672#issuecomment-1961009618

   I think use JavaConfig like
   ``` java
           @ConditionalXXX("local")
           @Bean
           @Reference(group = "${myapp.group}", interfaceClass = HelloService.class)
           public ReferenceBean<HelloService> helloService() {
               return new ReferenceBean();
           }
   
           @ConditionalXXX("cluster")
           @Bean
           @Reference(group = "${myapp.group}", interfaceClass = HelloService.class)
           public HelloService helloService() {
               return new HelloService();
           }
   
   ```
   
    and `@Conditional` is better


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Unable to find providers if switch to injvm protocol [dubbo]

Posted by "lxil520 (via GitHub)" <gi...@apache.org>.
lxil520 commented on issue #13672:
URL: https://github.com/apache/dubbo/issues/13672#issuecomment-1914176588

   您好!根据要求我重新创建了一个新的项目,并完整复现了这个问题
   复现过程
   1. 初始化项目并跟我的实际工程保持一致springboot 3.0.2, springCloud 2022.0.0, springCloudAlibaba 2022.0.0.0, dubbo 3.2.10
   2. 简单创建三个模块:消费模块,微服务定义模块,生产模块
   3. 简单写一个api demo发现injvm能正常访问
   4. 加入实际项目的shiro模块,之前的逻辑是在shiro的shiroFilterFactoryBean的时候把系统所有的权限加载给shiro,此时就报错了,完整复现了我提到的问题找不到生产者
   
   demo地址在下面,直接运行demo-consumer模块下面的Main类就可以复现:
   https://github.com/lxil520/dubbo-injvm-demo
   
   谢谢


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org