Biel Simon Biel Simon - 4 months ago 31
Java Question

How can I find which artifact has Spring RestTemplate?

I've been looking for the Spring RestTemplate artifact on Maven Central and only found the Android version. How can I find out what artifact contains it?


On Central, you can use the fc: tag to search for a fully-qualified classname, such as org.springframework.web.client.RestTemplate. The search results show that it's available in two artifacts, spring-android-rest-template and spring-web. This indicates that spring-web is indeed the artifact that contains that class.

(I believe the rationale for including it in one artifact is that the RestTemplate depends on a large number of annotations and similar classes provided by the Web artifact. If you think there's a good reason for splitting them, the Spring 5 development effort is underway, and you could open a ticket on the Spring JIRA to separate them.)