'Resource vs Controller in a Spring MVC project
I have seen some projects using a package named "resources" and some other projects using a package named "controllers", to put RestControllers. Which is the most common convention for a package name that contains rest controllers? If I'm writing rest controller for accessing user service, should the controller be named UserController or UserResource?
Solution 1:[1]
Both meaning the same, but Controller is more common. UserController is ok
Solution 2:[2]
Controller
Is for Spring MVC
Resource
Is for Jersey
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nicolas Osorio |
| Solution 2 | Dupeyrat Kevin |
