springboot調用其餘springboot實例的接口

首先定義一個類,內容以下:json @Configuration public class Appconfig { @Bean public RestTemplate restTemplate(){ return new RestTemplate(); } } 接着咱們就能夠在控制器那裏進行使用了:app 內容以下:rest @Controller publ
相關文章
相關標籤/搜索