title: Create a Java Spring API Router
body: <p>Im creating an API using Java and Spring. My question is, <strong>is there a standard way to organize the API routes into one file?</strong></p>
  
  <p>For example when creating an API using Express.JS there is one file, called the router, where all of the routes are declared and set up.</p>
  
  <p>With Spring's annotation-based MVC framework it seems like the routes are scattered through various controllers. So if someone who didn't write the API needed to make changes to it they would be left searching through files to find the specific route. </p>
  
  <p><strong>Is there a standard practice or pattern that would create a central router?</strong> Im thinking about just creating a router class however I would then have to create instances of MANY classes in that router. It doesn't seem very clean.</p>