Spring无法实例化你的TestController,因为它的唯一构造函数需要一个参数。你可以添加无参数构造函数,也可以在构造函数中添加@Autowired批注:
@Autowiredpublic TestController(KeeperClient testClient) { TestController.testClient = testClient;}在这种情况下,你要明确告诉Spring在实例化TestControlller时在应用程序上下文中搜索KeeperClient Bean并将其注入。



