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

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

Different ways to Authenticate a Web Application

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

CSRF Protection using Double Submitted Cookies

Use of DispatcherServlet in Spring MVC Framework

CSRF Protection using Synchronizer Tokens

Why you should use BCrypt to hash passwords

Agile Methodology – Know the What and How?