Explain the @Controller annotation.

Solution

The @Controller indicates the class is a Spring MVC controller stereotype which is automatically registered by context:component-scan in spring configuration file.

For Example:

@Controller
public class DemoController{
      //Insert code here
}

Share this thread

Comments

Comments
comments powered by Disqus

Navigation

Social Media