Hi Justin,
Instead of relying on mybatis-guice to inject your custom cache, you can implement a custom ConfigurationSetting.
In the configuration setting, just inject the Injector and call:
configuration.getCaches().forEach(cache->injector.injectMembers(cache));
On Tue, Sep 24, 2019 at 3:46 PM Poitras Christian <
Christia...@ircm.qc.ca<mailto:
Christia...@ircm.qc.ca>> wrote:
Justin,
If MyBatis registers all Cache instances at configuration time, then it is possible to inject dependencies in a similar way we do injection for the type handlers.
You can make a PR for this if you want. I will have a look in the next few days since it may be easy to fix.
As you said, you can make a static injection helper. Obviously, it is not recommended if an alternative exists.
Best,
Christian
To unsubscribe from this group and stop receiving emails from it, send an email to
mybatis-user...@googlegroups.com<mailto:
mybatis-user%2Bunsu...@googlegroups.com><mailto:
mybatis-user%2Bunsu...@googlegroups.com<mailto:
mybatis-user%252Buns...@googlegroups.com>><mailto:
mybatis-user...@googlegroups.com<mailto:
mybatis-user%2Bunsu...@googlegroups.com><mailto:
mybatis-user%2Bunsu...@googlegroups.com<mailto:
mybatis-user%252Buns...@googlegroups.com>>>.
To unsubscribe from this group and stop receiving emails from it, send an email to
mybatis-user...@googlegroups.com<mailto:
mybatis-user%2Bunsu...@googlegroups.com><mailto:
mybatis-user%2Bunsu...@googlegroups.com<mailto:
mybatis-user%252Buns...@googlegroups.com>>.
fie...@gmail.com<mailto:
fie...@gmail.com><mailto:
fie...@gmail.com<mailto:
fie...@gmail.com>>
To unsubscribe from this group and stop receiving emails from it, send an email to
mybatis-user...@googlegroups.com<mailto:
mybatis-user%2Bunsu...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mybatis-user/CANn6F%2Bsgf6vVMLcMuYrcODvAuL2LpwD0zEdyGMhpJqU3oP1jdQ%40mail.gmail.com<
https://groups.google.com/d/msgid/mybatis-user/CANn6F%2Bsgf6vVMLcMuYrcODvAuL2LpwD0zEdyGMhpJqU3oP1jdQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.