chore: Add comment on using annotation injections of beans
This commit is contained in:
parent
2af8c4ef42
commit
d294b58e2c
|
|
@ -63,6 +63,14 @@ import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||||
* the understanding of these interfaces.
|
* the understanding of these interfaces.
|
||||||
* ```
|
* ```
|
||||||
* Ref: https://theappsmith.slack.com/archives/CPQNLFHTN/p1669100205502599?thread_ts=1668753437.497369&cid=CPQNLFHTN
|
* Ref: https://theappsmith.slack.com/archives/CPQNLFHTN/p1669100205502599?thread_ts=1668753437.497369&cid=CPQNLFHTN
|
||||||
|
* <p>
|
||||||
|
* Note, we use the {@code @Autowired} annotation for bean injection here, instead of using constructor injection. This
|
||||||
|
* is an intentional exception to the usual recommendation. The reason is that this class is a base class for all other
|
||||||
|
* repository classes, and using constructor params would require all repository classes to have the same constructor
|
||||||
|
* params, and corresponding {@code super} calls. This was causing a lot of conflicts between CE and EE, and other
|
||||||
|
* additional overhead, with very little value to speak for. Hence, we are using {@code @Autowired} here.
|
||||||
|
* <p>
|
||||||
|
* <a href="https://theappsmith.slack.com/archives/CPQNLFHTN/p1711966160274399">Ref Slack thread</a>.
|
||||||
*/
|
*/
|
||||||
public abstract class BaseAppsmithRepositoryCEImpl<T extends BaseDomain> {
|
public abstract class BaseAppsmithRepositoryCEImpl<T extends BaseDomain> {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user