网关启动问题

Java 未结 1 2107
next
next 剑圣 2019-11-06 15:54

一、该问题的重现步骤是什么?

  1. 启动blade-gateway服务出现如下错误


----启动中,读取到的环境变量:[dev],jar地址:[/D:/gittianque/blade/BladeX/blade-gateway/target/classes/]----

2019-11-06 13:37:11.289  INFO 8260 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$92d91444] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

            ______  _             _       ___   ___

            | ___ \| |           | |      \  \ /  /

            | |_/ /| |  __ _   __| |  ___  \  V  /

            | ___ \| | / _` | / _` | / _ \   > <

            | |_/ /| || (_| || (_| ||  __/ /  .  \

            \____/ |_| \__,_| \__,_| \___|/__/ \__\


:: BladeX :: blade-gateway:dev :: Running SpringBoot 2.1.9.RELEASE :: 


2019-11-06 13:37:12.906  INFO 8260 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Loading nacos data, dataId: 'blade.yaml', group: 'DEFAULT_GROUP'

2019-11-06 13:37:12.950  INFO 8260 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Loading nacos data, dataId: 'blade-dev.yaml', group: 'DEFAULT_GROUP'

2019-11-06 13:37:13.023  INFO 8260 --- [           main] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource {name='NACOS', propertySources=[NacosPropertySource {name='blade-gateway-dev.yaml'}, NacosPropertySource {name='blade-gateway.yaml'}, NacosPropertySource {name='blade-dev.yaml'}, NacosPropertySource {name='blade.yaml'}]}

2019-11-06 13:37:13.033  INFO 8260 --- [           main] o.s.gateway.GateWayApplication           : The following profiles are active: dev

2019-11-06 13:37:14.063  WARN 8260 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'nacos-config' contains invalid characters, please migrate to a valid format.

2019-11-06 13:37:14.067  WARN 8260 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'nacos-discovery' contains invalid characters, please migrate to a valid format.

2019-11-06 13:37:14.291  INFO 8260 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!

2019-11-06 13:37:14.298  INFO 8260 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.

2019-11-06 13:37:14.350  INFO 8260 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 29ms. Found 0 repository interfaces.

2019-11-06 13:37:14.429  WARN 8260 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format.

2019-11-06 13:37:14.447  WARN 8260 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'hystrix.stream' contains invalid characters, please migrate to a valid format.

2019-11-06 13:37:14.761  INFO 8260 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=0c55800a-abb5-3e33-8156-96c849d906a2

2019-11-06 13:37:15.208  INFO 8260 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$92d91444] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-11-06 13:37:16.312  WARN 8260 --- [           main] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dynamicRouteServiceListener' defined in file [D:\gittianque\blade\BladeX\blade-gateway\target\classes\org\springblade\gateway\dynamic\DynamicRouteServiceListener.class]: Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springblade.core.launch.props.BladeProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

2019-11-06 13:37:16.424  INFO 8260 --- [           main] ConditionEvaluationReportLoggingListener : 


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2019-11-06 13:37:16.855 ERROR 8260 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 


***************************

APPLICATION FAILED TO START

***************************


Description:


Parameter 3 of constructor in org.springblade.gateway.dynamic.DynamicRouteServiceListener required a bean of type 'org.springblade.core.launch.props.BladeProperties' that could not be found.



Action:


Consider defining a bean of type 'org.springblade.core.launch.props.BladeProperties' in your configuration.




2.当我加上注解 程序能正常启动 如下图

@EnableConfigurationProperties({

BladeProperties.class

})

image.png 

3.问题:这块内容框架中是否有做特殊的处理,在哪边处理过





1条回答
  • 2019-11-06 17:54

    gateway依赖的jar包有这个配置,你本地用bladex-tool执行mvn clean install下,BladeX执行mvn clean compile试试。另外eclipse针对spi支持不友好,后续也许需要额外处理。详情参考:https://sns.bladex.cn/q-116.html

    image.png

    0 讨论(1)
提交回复