Register resources and load modules by injecting dependencies.