You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "diff-stone (via GitHub)" <gi...@apache.org> on 2025/01/06 10:39:26 UTC
[I] Spring, when scanning for Beans, might include interfaces, proxy classes, and other related components in the scan. If an implementation class (e.g., DefaultRocketMQLocalTransactionListener) is annotated with @RocketMQTransactionListener, its interface (RocketMQLocalTransactionListener) might also be indirectly included. [rocketmq-spring]
diff-stone opened a new issue, #701:
URL: https://github.com/apache/rocketmq-spring/issues/701
1、My custom a implementation class, inherited RocketMQLocalTransactionListener interface

2、When used, spring scans the interface itself and the implementation class
![Uploading Snipaste_2025-01-06_18-39-09.png…]()
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Spring, when scanning for Beans, might include interfaces, proxy classes, and other related components in the scan. If an implementation class (e.g., DefaultRocketMQLocalTransactionListener) is annotated with @RocketMQTransactionListener, its interface (RocketMQLocalTransactionListener) might also be indirectly included. [rocketmq-spring]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #701:
URL: https://github.com/apache/rocketmq-spring/issues/701#issuecomment-5381846707
**Issue Evaluation**
Category: | Status: **Evaluated**
This is expected Spring behavior. When Spring scans for beans, it discovers both interfaces and their implementations. The annotation on your implementation class triggers Spring to register it as a transaction listener bean.
The interface () itself is not instantiated as a bean unless explicitly annotated with or registered via . The implementation class () is the actual bean that gets created.
If you are seeing the interface being treated as a bean, please check:
1. Whether the interface itself has a or similar stereotype annotation
2. Whether there is a method that explicitly creates an instance of the interface
3. Your component scan configuration — ensure it targets the correct package
This is not a bug in rocketmq-spring; it is standard Spring IoC container behavior.
---
*Automated evaluation by RockteMQ-AI*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Spring, when scanning for Beans, might include interfaces, proxy classes, and other related components in the scan. If an implementation class (e.g., DefaultRocketMQLocalTransactionListener) is annotated with @RocketMQTransactionListener, its interface (RocketMQLocalTransactionListener) might also be indirectly included. [rocketmq-spring]
Posted by "diff-stone (via GitHub)" <gi...@apache.org>.
diff-stone closed issue #701: Spring, when scanning for Beans, might include interfaces, proxy classes, and other related components in the scan. If an implementation class (e.g., DefaultRocketMQLocalTransactionListener) is annotated with @RocketMQTransactionListener, its interface (RocketMQLocalTransactionListener) might also be indirectly included.
URL: https://github.com/apache/rocketmq-spring/issues/701
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org