当我尝试自动连接SpringRestTemplate时,我得到了以下错误:
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.web.client.RestTemplate] found for dependency: expected在注释驱动的环境中使用Spring4。
我有一个Java库(不是应用程序),它通过电话号码发送通知。我使用Rest模板发送POST请求。但是,我不想创建RestTemplate的新对象,而是使用RestTemplateConfiguration @Configuration来实现。IntelliJ版本- 2020.2Spring -- 11
第一期-当我试图创建一个RestTemplateConfiguration类时,我得到了错误- Could not autowire.RestTemplateBuilder builder