Configure the Spring Dispatcher Servlet using all Java Code (no xml)

Here are the steps


1. Delete the files: web.xml file and spring-mvc-demo-servlet.xml files
2. Create a new Java package: com.luv2code.springdemo.config
3. Add the following Java files in your package
File: DemoAppConfig.java

File: MySpringMvcDispatcherServletInitializer.java
4. Test your app
Your app should work as desired.

Comments

Popular posts from this blog

Use @Initbinder in Spring MVC

Nginx

AWS Configuration For RDS(postgres),ElastiCache(Redis) with ElasticBean

Different ways to Authenticate a Web Application

The TRUE difference between [] and {{}} bindings in Angular

Why you should use BCrypt to hash passwords

CSRF Protection using Double Submitted Cookies

CSRF Protection using Synchronizer Tokens

Use of DispatcherServlet in Spring MVC Framework

Agile Methodology – Know the What and How?