/**
* Binds transaction interceptor for all methods or classes that are annotated with {@link Transactional}.
*/
public static void bindTransactionInterceptor(@NotNull Binder binder, @NotNull Key<Database> databaseKey) {
Provider<Database> databaseProvider = binder.getProvider(databaseKey);
MethodInterceptor interceptor = new AopAllianceTransactionalMethodInterceptor(databaseProvider);
binder.bindInterceptor(any(), annotatedWith(Transactional.class), interceptor);
binder.bindInterceptor(annotatedWith(Transactional.class), any(), interceptor);
}