Created by: chrylis
Spring provides the RestOperations
interface as the base API for the
RestTemplate
model, and the interface should be used whenever
practical. Switching to the interface instead of the implementing class
particularly makes test integrations easier both for code consuming
the ApiClient
and for testing server implementations through it with
MockMvc.
This improvement should apply cleanly against 3.4 and 4.0-SNAPSHOT.
The petstore generator completed successfully for resttemplate-withxml
, but plain resttemplate
complains about existing directories with mkdir
; I can include all those files as well if needed but didn't want to contribute a partial set.