Skip to content
thesarfo

Reference

Spring Start Here: Keywords

Core Spring vocabulary — service, repository, proxy, servlet container, view, controller, bean, and @Component.

views 0
  1. Service — an object that implements a use case in a real-world application. Used to add business functionality.
  2. Repository — an object that works directly with a database.
  3. Proxy — an object that stands in for another object, controlling access to it.
  4. Servlet container — you need something that not only understands HTTP, but can translate the HTTP request and response into a Java app. That’s a servlet container (sometimes called a web server) — a translator of HTTP messages for your Java app. A servlet container (e.g., Tomcat) speaks HTTP: it translates the HTTP request into your Spring app and the app’s response back into an HTTP response. This means you don’t need to care about the network protocol — you just write everything as Java objects and methods.
  5. View — the JSON response of your web API, or the template rendered server-side.
  6. Controller — a component of the web app containing methods (actions) executed for a specific HTTP request. It should be kept dumb — logic belongs in services, not controllers.
  7. Group — the reverse domain, e.g. example.com becomes com.example.
  8. Artifact — the name of the project you’re building.
  9. Bean — an instance of a class that the Spring application context manages for you.
  10. @Component — tells Spring that it should be in charge of managing the class.