From the course: Spring: Spring MVC
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Java configuration for Spring MVC
- [Instructor] Let's go to the next step now. We have to add the Java configuration to bootstrap the DispatcherServlet class. Now the approach that we're going to adopt to in this entire course is that we're going to do all the configuration using either a Java configuration class or with the help of annotations. In a normal web application, you could have bootstrap an external servlet, using WebXML. But WebXML is not something that we're going to go ahead with, so entire bootstrapping of the DispatcherServlet will happen in a Java configuration class that I'm going to write now. So let's do that. On the IDE, let's create a package, here. Let's say com.test. And let's create a class which says ApplicationInitializer. Now this should implement a class which is called WebApplicationInitializer which is coming from the springframework web package. And this is going to provide you all the APIs in order to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
Why use Spring MVC?3m 42s
-
(Locked)
Features of Spring MVC3m 40s
-
(Locked)
Spring MVC architecture2m 7s
-
(Locked)
Create Maven Spring MVC project3m 25s
-
(Locked)
Add folders and static files2m 27s
-
(Locked)
Java configuration for Spring MVC10m 9s
-
(Locked)
Add controllers and test the application4m 59s
-
(Locked)
Generate Spring MVC project with Spring Boot5m 13s
-
(Locked)
Add static files and view resolver5m 3s
-
(Locked)
Add controllers and test the application7m 14s
-
(Locked)
-
-
-
-
-
-
-
-