Make sure the MainController instance is Spring-managed