Basically, you need to add a new Servlet on you web.xml, a configuration file (let's call it webApplicationContext.xml) and some Annotations.
This is my example:
My web.xmlThe framework will, on initialization of a DispatcherServlet, look for a file named [servlet-name]-servlet.xml (webApplicationContext-servlet.xml) in WEB-INF by default, but if you provide parameter "contextConfigLocation" you can define a location and name for your configuration file.
My webApplicationContext.xml
Which basically is divided in 3 sections:
- We're going to use configuration based onn annotations
- Location of my Controllers
- And where are located my JSP's
No comments:
Post a Comment