You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
privatevoidvalidate(ExtProducerResetConfigurationannotation,
GenericApplicationContextgenericApplicationContext) {
if (genericApplicationContext.isBeanNameInUse(annotation.value())) {
// ! BUG !// String.format 应该用 '%' 而不是 '{}' 作为占位符;另外,也不存在文本中提到的 '@ExtTemplateConfiguration' 注解thrownewBeanDefinitionValidationException(String.format("Bean {} has been used in Spring Application Context, " +
"please check the @ExtTemplateConfiguration",
annotation.value()));
}
}
privatevoidvalidate(ExtProducerResetConfigurationannotation,
GenericApplicationContextgenericApplicationContext) {
if (genericApplicationContext.isBeanNameInUse(annotation.value())) {
thrownewBeanDefinitionValidationException(String.format("Bean {} has been used in Spring Application Context, " +
"please check the @ExtTemplateConfiguration",
annotation.value()));
}
}
BUG REPORT
在使用的过程中,发现了 rocketmq-v5-client-spring-boot 的以下 3 个Bug:
String.format 应该用 '%' 而不是 '{}' 作为占位符;另外,也不存在文本中提到的 '@ExtTemplateConfiguration' 注解
private void registerTemplate(String beanName, Object bean)
中调用validate(annotation, genericApplicationContext)
检测beanName 是否已存在:以下 template 定义会导致导致 validate() 校验失败:
因为 FifoPruducerTemplate、FifoConsumerTemplate 使用了
fifoPruducerTemplate
和fifoConsumerTemplate
这个beanName,validate()
检测到存在这个beanName。因此报错。唯一的处理办法就是不能定义注解的value属性,因为只要value有值就过不了
validate()
校验。validate()
校验似乎是多余的,可以去掉;即使不去掉也应排除自身的 beanName。调用 keys.toString() 有问题:意味着无论 keys 参数是逗号分隔的字符串,或者是字符串数组,传入 messageBuilder.setKeys() 后都变为单个字符串。这似乎与 messageBuilder.setKeys() 的设计目标不一致。
The text was updated successfully, but these errors were encountered: