Hi,
It is becoming harder and harder to use self-injection:
There are probably more small issues like this. However, unlike more general dependency cycles, self-injection seems to be considered a legitimate strategy for some use cases (e.g. @Transactional, @Cacheable re-entrant calls ) by many.
spring-projects/spring-boot#27652 (comment) recommended to raise an issue to the framework team.
Is there an official documented strategy and list of legitimate use cases for self-injection ? #27534 (comment) for example recommends @Lazy.
Or are there other implementation strategies that can be used to replace self-injection in these use cases?
My personal interest is purely reentrant calls from service beans on @Transactional methods.
This issue could be used to track documentation fixes to clarify these common use cases.
Thanks in advance
Hi,
It is becoming harder and harder to use self-injection:
There are probably more small issues like this. However, unlike more general dependency cycles, self-injection seems to be considered a legitimate strategy for some use cases (e.g.
@Transactional,@Cacheablere-entrant calls ) by many.spring-projects/spring-boot#27652 (comment) recommended to raise an issue to the framework team.
Is there an official documented strategy and list of legitimate use cases for self-injection ? #27534 (comment) for example recommends
@Lazy.Or are there other implementation strategies that can be used to replace self-injection in these use cases?
My personal interest is purely reentrant calls from service beans on
@Transactionalmethods.This issue could be used to track documentation fixes to clarify these common use cases.
Thanks in advance