bladeX4.0.1,gateway启动报异常

Blade 已结 2 214
stefan0706
stefan0706 剑者 2024-07-04 10:03

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

1. nacos配置了自定义数据,AuthFilter中使用@value获取

image.png

image.png

image.png

二、你期待的结果是什么?实际看到的又是什么?

希望可以正常启动并且获取值

三、你正在使用的是什么产品,什么版本?在什么操作系统上?


四、请提供详细的错误堆栈信息,这很重要。

2024-07-04T09:58:30.509+08:00  WARN 20956 --- [blade-gateway] [           main] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authFilter' defined in file [D:\文件\xxx\xxx\xxx\blade-gateway\target\classes\org\springblade\gateway\filter\AuthFilter.class]: Unsatisfied dependency expressed through constructor parameter 4: No qualifying bean of type 'java.lang.String' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

2024-07-04T09:58:30.540+08:00  INFO 20956 --- [blade-gateway] [           main] .s.b.a.l.ConditionEvaluationReportLogger : 


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

2024-07-04T09:58:30.574+08:00 ERROR 20956 --- [blade-gateway] [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 


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

APPLICATION FAILED TO START

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


Description:


Parameter 4 of constructor in org.springblade.gateway.filter.AuthFilter required a bean of type 'java.lang.String' that could not be found.



Action:


Consider defining a bean of type 'java.lang.String' in your configuration.



五、若有更多详细信息,请在下面提供。

2条回答
提交回复