Used the DependencyInjectionApplicationFactory instead of creating the object ourselves.