apache / dubbo-spring-boot-project

Spring Boot Project for Apache Dubbo
https://dubbo.apache.org
Apache License 2.0
5.41k stars 1.88k forks source link

和RocketMQ使用时无法暴露服务 #216

Closed chenyf3 closed 6 years ago

chenyf3 commented 6 years ago

Dubbo-Starter版本:0.1.0 Dubbo版本:2.6.2 RocketMQ版本:4.2.0 在一个项目里面,只使用RocketMQ时是可以正常的启动生产者、消费者,也可以正常的实现消息发送和消费,只使用Dubbo时也可以正常的实现服务的暴露,在dubbo-admin后台可以看到有服务提供者注册到,但是当两者同时出现在一个项目中时Dubbo无法暴露服务,启动日志如下:

2018-07-01 14:42:33.515 INFO 82 locate Fetching config from server at: http://127.0.0.1:7071 2018-07-01 14:42:34.528 INFO 96 locate Located environment: name=service-provider, profiles=[dev], label=null, version=fffdb4ad9a9f524847e34a14c3803e4241d35c60, state=null 2018-07-01 14:42:34.538 INFO 597 logStartupProfileInfo The following profiles are active: dev 2018-07-01 14:42:34.557 INFO 583 prepareRefresh Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@40620d8e: startup date [Sun Jul 01 14:42:34 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1ef3efa8 2018-07-01 14:42:35.033 INFO 121 registerDubboConfigBean The dubbo config bean definition [name : service-provider, class : com.alibaba.dubbo.config.ApplicationConfig] has been registered. 2018-07-01 14:42:35.035 INFO 145 registerDubboConfigBindingBeanPostProcessor The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : service-provider] has been registered. 2018-07-01 14:42:35.035 INFO 121 registerDubboConfigBean The dubbo config bean definition [name : zookeeperResister, class : com.alibaba.dubbo.config.RegistryConfig] has been registered. 2018-07-01 14:42:35.035 INFO 145 registerDubboConfigBindingBeanPostProcessor The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : zookeeperResister] has been registered. 2018-07-01 14:42:35.036 INFO 121 registerDubboConfigBean The dubbo config bean definition [name : dubbo, class : com.alibaba.dubbo.config.ProtocolConfig] has been registered. 2018-07-01 14:42:35.036 INFO 145 registerDubboConfigBindingBeanPostProcessor The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : dubbo] has been registered. 2018-07-01 14:42:35.036 INFO 121 registerDubboConfigBean The dubbo config bean definition [name : com.alibaba.dubbo.config.ProviderConfig#0, class : com.alibaba.dubbo.config.ProviderConfig] has been registered. 2018-07-01 14:42:35.037 INFO 145 registerDubboConfigBindingBeanPostProcessor The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : com.alibaba.dubbo.config.ProviderConfig#0] has been registered. 2018-07-01 14:42:35.078 WARN 166 doScan No MyBatis mapper was found in '[org.study.service.provider]' package. Please check your configuration. 2018-07-01 14:42:35.200 WARN 373 enhanceConfigurationClasses Cannot enhance @Configuration bean definition 'com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'. 2018-07-01 14:42:35.278 INFO 288 setSerializationId BeanFactory id=78bd9c95-634a-34be-92a3-fb48dea25c8f 2018-07-01 14:42:35.478 INFO 327 postProcessAfterInitialization Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$c801f362] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:35.537 INFO 327 postProcessAfterInitialization Bean 'com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure' of type [com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure$$EnhancerBySpringCGLIB$$e1ade8d4] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:35.656 INFO 327 postProcessAfterInitialization Bean 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:35.662 INFO 327 postProcessAfterInitialization Bean 'com.alibaba.druid.spring.boot.autoconfigure.stat.DruidFilterConfiguration' of type [com.alibaba.druid.spring.boot.autoconfigure.stat.DruidFilterConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:35.732 INFO 327 postProcessAfterInitialization Bean 'statFilter' of type [com.alibaba.druid.filter.stat.StatFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:35.960 INFO 327 postProcessAfterInitialization Bean 'dataSource' of type [com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceWrapper] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:35.985 INFO 327 postProcessAfterInitialization Bean 'org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration' of type [org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration$$EnhancerBySpringCGLIB$$5c75ee6c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:36.000 INFO 327 postProcessAfterInitialization Bean 'spring.transaction-org.springframework.boot.autoconfigure.transaction.TransactionProperties' of type [org.springframework.boot.autoconfigure.transaction.TransactionProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:36.003 INFO 327 postProcessAfterInitialization Bean 'platformTransactionManagerCustomizers' of type [org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:36.009 INFO 327 postProcessAfterInitialization Bean 'org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration$DataSourceTransactionManagerConfiguration' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration$DataSourceTransactionManagerConfiguration$$EnhancerBySpringCGLIB$$75028bd1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:36.025 INFO 327 postProcessAfterInitialization Bean 'transactionManager' of type [org.springframework.jdbc.datasource.DataSourceTransactionManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:36.026 INFO 327 postProcessAfterInitialization Bean 'txAdviceConfig' of type [org.study.service.provider.config.TxAdviceConfig$$EnhancerBySpringCGLIB$$d1797c5c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:36.039 INFO 327 postProcessAfterInitialization Bean 'txAdvice' of type [org.springframework.transaction.interceptor.TransactionInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:36.047 INFO 327 postProcessAfterInitialization Bean 'txAdviceAdvisor' of type [org.springframework.aop.support.DefaultPointcutAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:36.150 INFO 327 postProcessAfterInitialization Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$e41bf65f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-07-01 14:42:36.706 INFO 268 doValidateClass Final method [protected final java.lang.String com.gw.common.service.MyBatisDao.fillSqlId(java.lang.String)] cannot get proxied via CGLIB: Calls to this method will NOT be routed to the target instance and might lead to NPEs against uninitialized fields in the proxy instance. 2018-07-01 14:42:36.706 INFO 268 doValidateClass Final method [protected final java.lang.String com.gw.common.service.MyBatisDao.filterSortColumns(java.lang.String)] cannot get proxied via CGLIB: Calls to this method will NOT be routed to the target instance and might lead to NPEs against uninitialized fields in the proxy instance. 2018-07-01 14:42:36.707 WARN 265 doValidateClass Unable to proxy interface-implementing method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is marked as final: Consider using interface-based JDK proxies instead! 2018-07-01 14:42:36.707 INFO 268 doValidateClass Final method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] cannot get proxied via CGLIB: Calls to this method will NOT be routed to the target instance and might lead to NPEs against uninitialized fields in the proxy instance. 2018-07-01 14:42:37.001 INFO 41 logVersion Redisson 3.6.5 2018-07-01 14:42:38.140 INFO 145 operationComplete 32 connections initialized for /127.0.0.1:6866 2018-07-01 14:42:38.140 INFO 145 operationComplete 1 connections initialized for /127.0.0.1:6866 2018-07-01 14:42:38,652 main WARN No Root logger was configured, creating default ERROR-level Root logger with Console appender

mercyblitz commented 6 years ago

Please use 0.1.1 or 0.2.0

chenyf3 commented 6 years ago

谢谢回答,不过升级之后也没有用,最终在这里得到了答案:http://www.xue63.com/toutiaojy/20180119G0KYJ100.html