启动报错: Field restTemplate in com.abc.controller.SomeController required a bean of type ‘org.springframework.web.client.RestTemplate’ that could not be found.
原因:变量没有注入
解决办法:动态提供变量所在类是否交给Spring容器管理。即用@Component(controller,servcie,repository层通用注解), @Controller, @Service, @Repository之一修饰