injecting factories with autowire hints