The difference between Controller vs RestController in Sprin

Quick guide to Controller versus RestController in Spring with examples and clear rules for choosing the right annotation for views or APIs