春季靴2.6.6与kafka appender的缺陷
我想升级我的应用程序,以便使用Spring Boot的更新版本。另外,我将log4j2与kafka appender一起使用。
虽然,当我升级到2.6.6时。 2.6.4的版本我有以下错误:
configexception:bootstrap.servers中给出的无可分解的bootstrap url
我的appender的配置是以下内容:
appender.kafka.type=Kafka
appender.kafka.name=MyKafkaAppender
appender.kafka.layout.type=PatternLayout
appender.kafka.layout.pattern=<%.-1p %d{yyyyMMMdd HH:mm:ss.SSS}> %X{mdc} %m%n
appender.kafka.topic=my_topic
appender.kafka.property.type=Property
appender.kafka.property.name=bootstrap.servers
appender.kafka.property.value=0.0.0.0:9092
在调试后,我会遇到以下结果:直到forvial the Inluction:
直到直到版本版本版本2.6.4属性对象如下:
name: "bootstrap.servers"
value: "0.0.0.0:9092"
valueNeedsLookup: false
尽管在log4j2中具有相同配置的版本2.6.6中
name: "bootstrap.servers"
rawValue: "0.0.0.0:9092"
value: null
valueNeedsLookup: false
。
我的问题是:有什么办法可以设置新结构的价值字段?另外,这种结构是否预期?
I want to upgrade my app in order to use the updated version of spring boot. Also, i am using log4j2 with a Kafka appender.
Although, when i upgrated to 2.6.6. version from 2.6.4 i had the following error:
ConfigException: No resolvable bootstrap urls given in bootstrap.servers
The configuration of my appender is the following:
appender.kafka.type=Kafka
appender.kafka.name=MyKafkaAppender
appender.kafka.layout.type=PatternLayout
appender.kafka.layout.pattern=<%.-1p %d{yyyyMMMdd HH:mm:ss.SSS}> %X{mdc} %m%n
appender.kafka.topic=my_topic
appender.kafka.property.type=Property
appender.kafka.property.name=bootstrap.servers
appender.kafka.property.value=0.0.0.0:9092
After some debugging i come across the following result:
Until version 2.6.4 the properties object was the following:
name: "bootstrap.servers"
value: "0.0.0.0:9092"
valueNeedsLookup: false
Although, in version 2.6.6 with the same configuration in log4j2.properties the properties object has this form:
name: "bootstrap.servers"
rawValue: "0.0.0.0:9092"
value: null
valueNeedsLookup: false
This is the reason i get the error i mentioned before.
My question is: Is there any way i can set the value field of the new structure? Also, is this structure expected?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论