Simple Spring MVC Application (Annotation)
General steps taken in the video above.(Not the exact steps)
- Clone project from previous blog post: Simple Spring MVC Application. Rename the project to spring-mvc-2
- Create AppConfig.java class in package org.greenhorn.spring.config with the below content:
- Delete springmvc-servlet.xml. This has been replaced by AppConfig.java class:
- Update web.xml with the spring configuration class, AppConfig:
- Change HelloReaderController.java. Change RequestMapping to “/hi” and change the “message“
- Run the project from netbeans.
NOTE The sample maven project used for this exercise can be downloaded from: |
---|