00:01 Understanding client-server architecture and its application in web and mobile development 02:03 Server used to send layout and data, but now separate applications for front and back end 04:04 Adding Spring Web dependency for Spring Boot Web startup project 05:59 Spring Boot allows running a web project without coding 08:08 Creating a controller class to handle server requests 10:20 Using @Controller in Spring Boot for handling multiple requests 12:24 Spring web returning data 14:24 Using Rest Controller to return data 16:31 Introduction to Spring MVC front controller 18:22 Sending data from client to server
I am very grateful I found you channel Sir. I am enjoying every videos of you your teaching style is so awesome I am not getting bore. By the way thankyou so much for providing this course .
Thank you so much for what you are doing. There is a video for every step of the learning process. Immensely appreciate your efforts!! Makes our life very easy!!
1. @Controller Marks a class as a Spring MVC Controller. Primarily used to handle web page navigation by returning view names. It is often combined with a view template engine (e.g., Thymeleaf, JSP). By default, methods in a @Controller class return a view name (not raw data). Example: java Copy code @Controller public class HomeController { @RequestMapping("/home") public String homePage() { return "home"; // Resolves to home.jsp or home.html (view template). } } 2. @RestController Combines @Controller and @ResponseBody. Indicates that the class is designed for REST APIs. Methods return data (e.g., JSON, XML) directly instead of a view name. Example: java Copy code @RestController public class ApiController { @RequestMapping("/api/data") public String getData() { return "This is JSON data"; // Response body returned directly. } } 3. @ResponseBody Indicates that a method's return value should be written directly to the HTTP response body (as JSON or plain text) instead of rendering a view. Often used in @Controller methods when returning raw data. Example with @Controller: java Copy code @Controller public class DataController { @RequestMapping("/api/message") @ResponseBody public String getMessage() { return "Hello, this is a response from @Controller with @ResponseBody."; } } 4. @RequestMapping Maps HTTP requests to specific handler methods. Can be used on classes (for a base URL) or methods (for specific endpoints). Supports additional attributes like method (e.g., GET, POST). Example with Method Mapping: java Copy code @RestController public class RequestController { @RequestMapping(value = "/api/users", method = RequestMethod.GET) public List getUsers() { return List.of("Alice", "Bob", "Charlie"); } } Example with Class-Level Mapping: java Copy code @RestController @RequestMapping("/api") public class UserController { @RequestMapping("/users") public List getUsers() { return List.of("Alice", "Bob", "Charlie"); } @RequestMapping("/roles") public List getRoles() { return List.of("Admin", "User", "Guest"); } } Differences and Use Cases Annotation Use Case @Controller For rendering views (e.g., JSP, Thymeleaf). Often used in web applications. @RestController For building RESTful APIs. Methods return data directly (e.g., JSON). @ResponseBody Converts method return values to HTTP response body (use in @Controller for raw data). @RequestMapping Maps HTTP requests to handler methods. Flexible for REST and traditional controllers.
Client sends an HTTP Request which can be in the form of JSON or XML, Jackson is used for parsing this data into Java Objects. This data is send on a server which can be deduced to compared with our JVM. This server serves HTTP Request and is built upon Java Servlet. Tomcat is responsible for management of this server.
When a HTTP request is sent from client to the server, controller is the entry point. Within the server, the Spring Boot provides a front controller which serves as a bridge between request sent and the actual controller. Our application can have multiple controllers, then how does it recognize which controller to use. This is all where in the Front Controller comes into the picture.
Hello Alien. Today i saw your playlist ,My mind blocked. May I know that how can you able to learnt those things ? Apart from that your teaching is Excellent. Sorry ,
Pls continue, we need this series, its a gem, every video is a masterpiece!!
Getting a better understanding of springboot only because of your perfect explanations and examples. Keep it up. Thank you so much
Hello
Have you tried it in your system
It's was showing an error in pom.xml file
00:01 Understanding client-server architecture and its application in web and mobile development
02:03 Server used to send layout and data, but now separate applications for front and back end
04:04 Adding Spring Web dependency for Spring Boot Web startup project
05:59 Spring Boot allows running a web project without coding
08:08 Creating a controller class to handle server requests
10:20 Using @Controller in Spring Boot for handling multiple requests
12:24 Spring web returning data
14:24 Using Rest Controller to return data
16:31 Introduction to Spring MVC front controller
18:22 Sending data from client to server
i don't know what to say but you make spring looks like very easy to understand, Thanks from Morocco
Please continue this series sir, your explanation was simple and good
The flow of this video and the overall content for the spring playlist is quite awesome. Keep it up..
I am very grateful I found you channel Sir. I am enjoying every videos of you your teaching style is so awesome I am not getting bore. By the way thankyou so much for providing this course .
Thank you so much for what you are doing. There is a video for every step of the learning process. Immensely appreciate your efforts!! Makes our life very easy!!
Pls continue, we need this series, its a gem, every video is a masterpiece!!
Please continue, this series is very helpful to learn spring boot in a simple way.
Working with MVC pattern is awesome!
Great explanation ❤ thanks for sharing this series please continue
Thank You So much for these videos, these videos are clearing my concepts.❤❤
Your explanations and examples are awesome!
Please keep it up.
And thank you so much🙏
These videos are so well explained! Thank you for these series
I'm learning a lot from your videos! Thanks!
I'm learning a lot from your videos! more Please!
Blessed with your teaching ❤
Awesome Lecture Sir... I'm enjoying your spring 6 series
i love spring because of you , thank you sooo much
Nice video, really loved way you explain
Excellent spring series
Loved the series... please continue.
Wonderful Navin, Keep up the good work
Thanks..Intresting information that need to be taken up again ...
greate series , thank you for posting this , pleaase continue keep posting
Very stupendous videos sir, love your interpretations.
This is just Awesome, please continue sir
Great work sir on explanation .
this man is outstanding!
This course is awesome!
Awesome explanation sir 🎉
1. @Controller
Marks a class as a Spring MVC Controller.
Primarily used to handle web page navigation by returning view names.
It is often combined with a view template engine (e.g., Thymeleaf, JSP).
By default, methods in a @Controller class return a view name (not raw data).
Example:
java
Copy code
@Controller
public class HomeController {
@RequestMapping("/home")
public String homePage() {
return "home"; // Resolves to home.jsp or home.html (view template).
}
}
2. @RestController
Combines @Controller and @ResponseBody.
Indicates that the class is designed for REST APIs.
Methods return data (e.g., JSON, XML) directly instead of a view name.
Example:
java
Copy code
@RestController
public class ApiController {
@RequestMapping("/api/data")
public String getData() {
return "This is JSON data"; // Response body returned directly.
}
}
3. @ResponseBody
Indicates that a method's return value should be written directly to the HTTP response body (as JSON or plain text) instead of rendering a view.
Often used in @Controller methods when returning raw data.
Example with @Controller:
java
Copy code
@Controller
public class DataController {
@RequestMapping("/api/message")
@ResponseBody
public String getMessage() {
return "Hello, this is a response from @Controller with @ResponseBody.";
}
}
4. @RequestMapping
Maps HTTP requests to specific handler methods.
Can be used on classes (for a base URL) or methods (for specific endpoints).
Supports additional attributes like method (e.g., GET, POST).
Example with Method Mapping:
java
Copy code
@RestController
public class RequestController {
@RequestMapping(value = "/api/users", method = RequestMethod.GET)
public List getUsers() {
return List.of("Alice", "Bob", "Charlie");
}
}
Example with Class-Level Mapping:
java
Copy code
@RestController
@RequestMapping("/api")
public class UserController {
@RequestMapping("/users")
public List getUsers() {
return List.of("Alice", "Bob", "Charlie");
}
@RequestMapping("/roles")
public List getRoles() {
return List.of("Admin", "User", "Guest");
}
}
Differences and Use Cases
Annotation Use Case
@Controller For rendering views (e.g., JSP, Thymeleaf). Often used in web applications.
@RestController For building RESTful APIs. Methods return data directly (e.g., JSON).
@ResponseBody Converts method return values to HTTP response body (use in @Controller for raw data).
@RequestMapping Maps HTTP requests to handler methods. Flexible for REST and traditional controllers.
please sir continue ... to our{Junior java developers}
because u have the presentation skill and ur lecture is clear
Thanks for the great explanation-it really helped!
we need this series!
thanks!
thanks for this wonderful playlist
Great one. I am actually following your footsteps.
Best explanation 🤚🥇
Thank you so much for this series sir
Great explanation. Thank you.
Very easy to understand
you are a good tutor👌
Thanks a lot for this series
Thank you so much usefull Sir❤❤
awesome explanation
Excellent sir G.
I came here for revise, it's so informative.
Nice explanation Naveen
Waiting for the next video, great series
Superb Content
Best among the rest 🎉
Great Job
Client sends an HTTP Request which can be in the form of JSON or XML, Jackson is used for parsing this data into Java Objects. This data is send on a server which can be deduced to compared with our JVM. This server serves HTTP Request and is built upon Java Servlet. Tomcat is responsible for management of this server.
Reachin target. wooohooo !!!
waiting for next videos sir, thank you
Great Stuff ❤
Another awesome video
Nice Video sir Thank You
Sir, please make a series on Hibernate.
Let's go on Navin!!! 🥇🥇
I am not just taught, but educated in the art of curiosity
Amazing indeed.
You educate for sure!!!!
When a HTTP request is sent from client to the server, controller is the entry point. Within the server, the Spring Boot provides a front controller which serves as a bridge between request sent and the actual controller. Our application can have multiple controllers, then how does it recognize which controller to use. This is all where in the Front Controller comes into the picture.
Are you able to write with both hands ? 18:10 vs 18:20
he just reversed webcam. look at his tshirt.
Commenting for more videos
Sir , Your videos are Amazing, Please upload them timely. Waiting for your next video.
Sir, the FrontController is also called as DispatcherServlet right ?, managing all the web requests
Yes we used to call that from old servlet concept
Nice explanation
Simple and deep
Thank you sir for this video ❤
Thank you for the videos
Plz continue this series
Please continue the series SIR
thank you a lot sir so excited
this series gives me excitement & good dopamine which i usually get from WWE in my childhood 😂
Hopefully waiting for future videos.
Tnq guru more concepts vedios u can upload plz on java back end developer
Waiting for next video😊
Sir please upload videos regularly sir 😊
simplicity redefined
good video. Thanks sir.
Hello Alien. Today i saw your playlist ,My mind blocked. May I know that how can you able to learnt those things ?
Apart from that your teaching is Excellent. Sorry ,
Thank you very much
Nice Content!
thanks for making the video
Thank you so much sir
We hope that you will upload next video soon😊
How do you open multiple projects in same window?
I see you could switch with tabs between multiple projects.
If we write Controller outside of sinpleWebApp, do we need to add any other configuration?
Or maybe, just I am lying here... 8:40 🤣🤣
We I'll wait for next episode Navin
Sir can you do tutorial on nginx after this tutorial
Thank you sir
any plan to start blockchain tutorial. its very hard to find the best training in blockchain, mostly on private blockchain
Thanks a lot
Thank you sir
MVC is awesome
He is really good