Naming Conventions for Classes in Spring / Jakarta Applications
For a modern Java application, developers use widely recognized naming conventions that make codebases easier to navigate.
Suppose you want to give a name to objects by what their class is responsible for. The table is organizing so that it show in the first column the purpose of the object and in the other columns convention to follow to give a name to a class.
A small caveat first:
@Service,@Repository, and@Controllerare Spring stereotypes.- Jakarta EE does not provide direct equivalents for all of them.
- In Jakarta EE, developers often use
@ApplicationScoped,@RequestScoped,@Singletonor EJB annotations such as@Stateless.
So the mapping is sometimes exact, sometimes only conceptual.
