In this java tutorial, we will address Spring MVC's annotation based configuration. We can easily create our controller with a simple class level annotation. Then we'll have to create a method that will handle our request/response and forward that request/response to a particular view. With spring's view resolver. In this example, we will add an Object (a message String) to the request and display it.




Maven configuration


You need the following jar files. So either add this pom.xml file to your application or download and add the jar files to your class-path.




Screenshots


spring-mvc-hello-world


References