- Видео 16
- Просмотров 49 043
The Tech Mojo
Великобритания
Добавлен 7 июн 2014
Weekly tutorials on Java, Spring Boot, and Microservices.
My name is Nilanchal. With over 15 years of experience in software development, I am here to share my knowledge with the community. I started this channel with the aim of creating weekly video lessons, how-to guides, and best practices for covering Java, Spring, Python, Django, Design patterns, and MicroService architecture.
If you enjoy the awesome content, and helpful tech videos, then please subscribe to my RUclips channel and join me on this new learning path.
If you have any questions or want to learn about any specific subject, please write down in the comment section. I will respond to you as soon as possible.
Thank you!
My name is Nilanchal. With over 15 years of experience in software development, I am here to share my knowledge with the community. I started this channel with the aim of creating weekly video lessons, how-to guides, and best practices for covering Java, Spring, Python, Django, Design patterns, and MicroService architecture.
If you enjoy the awesome content, and helpful tech videos, then please subscribe to my RUclips channel and join me on this new learning path.
If you have any questions or want to learn about any specific subject, please write down in the comment section. I will respond to you as soon as possible.
Thank you!
Working with XML-Based REST API with Spring Boot
This video explains how to handle XML requests and responses in Spring Boot REST APIs using jackson-dataformat-xml dependency. I will demonstrate how to convert a REST controller to accept application/XML content as a payload and return an XML response.
⛩️ Navigation
00:00 Introduction
03:24 Jackson XML Dependency
04:05 Update RestController to accept and produce XML
07:05 Configuring Default Content Negotiation
08:47 Wrapping XML Response using Jackson
12:03 Thank you for watching 💕💕💕
🍃 Code & Resources
Read the transcript here: stacktips.com/articles/handling-xml-request-and-response-in-spring-boot-rest
Grab the code for this tutorial here: github.com/StackTipsLab/spring-boot-tutorials/tree/main...
⛩️ Navigation
00:00 Introduction
03:24 Jackson XML Dependency
04:05 Update RestController to accept and produce XML
07:05 Configuring Default Content Negotiation
08:47 Wrapping XML Response using Jackson
12:03 Thank you for watching 💕💕💕
🍃 Code & Resources
Read the transcript here: stacktips.com/articles/handling-xml-request-and-response-in-spring-boot-rest
Grab the code for this tutorial here: github.com/StackTipsLab/spring-boot-tutorials/tree/main...
Просмотров: 561
Видео
Importing CSV Data into PostgreSQL using Spring Batch
Просмотров 1,4 тыс.8 месяцев назад
This tutorial will build a Spring boot application that uses Spring Batch to import CSV content into Postgres SQL DB. We will use chunk-based processing for reading content from large CSV files, process it, and then store the data in Postgres SQL. For managing the database migrations we will use Flyway. 00:00 Introduction to Spring Batch 04:49 Key Components of Spring Batch Application 09:16 Im...
Validating @ConfigurationProperties in Spring Boot
Просмотров 6918 месяцев назад
The @ConfigurationProperties annotation in Spring Boot is used to bind configuration parameters typically from properties or YAML files to a Java class. But, did you know you also can validate configuration properties at spring application startup with @ConfigurationProperties annotation? This video explains how to implement validation at Spring Boot application startup. ❤️ Get in touch: Websit...
Using Flyway for Managing Database Migrations in Spring Boot
Просмотров 4,3 тыс.9 месяцев назад
Flyway is a popular open-source tool for managing database migrations. It makes it easy to manage and version control the database schema for your application. Flyway supports almost all popular databases including Oracle, SQL Server, DB2, MySQL, Amazon RDS, Aurora MySQL, MariaDB, PostgreSQL and more. This video provides a step-by-step guide to configuring and using Flyway for managing database...
Replace Embedded Tomcat with Jetty or Undertow Server in Spring Boot 3
Просмотров 2,1 тыс.Год назад
Spring Boot framework is the built-in support for embedded servers. It includes support for embedded Tomcat, Jetty, and Undertow servers. The embedded Tomcat server is available through the spring-boot-starter-web dependency. However, if you want Jetty or Undertow servers then you can include spring-boot-starter-jetty or spring-boot-starter-undertow dependencies. This video explains how to repl...
Chapter1- Introduction Spring Boot Framework
Просмотров 646Год назад
This tutorial introduces the Spring Boot framework, its key features, and the Spring Boot Starter project. This tutorial is intended for developers who are new to Spring Boot and want to get started quickly. The tutorial highlights Spring Boot's features, including Auto Configuration, Dependency Injection, Starter Dependencies, Embedded Servers (Tomcat, Jetty, Undertow), and Integration with ot...
Using Interceptor in Spring Boot
Просмотров 27 тыс.Год назад
Spring Interceptors are used to intercept client requests before they are handled by the controller. They can also be used to intercept the response before the response is sent back to the client. Interceptors are part of the Spring Web MVC framework and provide a way to add pre/post-processing logic to your application's request-response lifecycle. ⛩️ Navigation 00:49 Introduction to Intercept...
How to Set up MongoDB within a Docker Container
Просмотров 1,7 тыс.Год назад
A step-by-step tutorial that covers how to set up MongoDB within a Docker container effortlessly and expose the container port on your host machine. Follow this how-to guide to get your MongoDB container up and running in no time. Whether you're a developer, sysadmin, or just curious about Docker and databases, this guide will simplify the process and get you started with MongoDB in Docker. 00:...
Running Code after Spring Boot Application starts
Просмотров 1,3 тыс.Год назад
In this video, we will learn about how to execute code on the Spring Boot application startup. Spring boot offers multiple options, for executing your code during the application startup. 00:00 - Intro 00:46 - Option-1: Using @PostConstruct annotation 03:09 - Option-2: Using ApplicationRunner or Command Line Runner Interface 08:39 - Option-3: Using Spring Boot Events This video tutorial covers ...
Setting Context Path to a Spring Boot Application
Просмотров 1,9 тыс.Год назад
In this video, we will see how to add a context path to your Spring Boot application. In a Spring Boot application, the context path represents the base URL for accessing your application. By default, it's set to '/', If you like this how-to guide, please like this video and subscribe to my channel for more such content. If you have any questions, let me know in the comment section below. I wil...
Create and Customise CardView Widget in Flutter
Просмотров 507Год назад
This video will explore how to create and customize a CardView in Flutter. In this tutorial, we will dive into the basics of creating a CardView and explore various customization options available in Flutter. Visit my blog to read this full article stacktips.com/articles/create-and-customize-card-widget-in-flutter ❤️ Get in touch: Website: stacktips.com Twitter: asknilan Github: git...
Floating Action Button Example in Flutter
Просмотров 514Год назад
Floating Action Button Example in Flutter
Creating Floating Action Button in Flutter
Просмотров 249Год назад
Creating Floating Action Button in Flutter
Can't we put both the schema models in v1__initmigration.sql
This was helpful, thanks!
very well explained, could you please come up with a video about filter?
Got a clear understanding of how interceptors are used, defined, and called. Appreciate your efforts in making this video, Thank you.
this is helpful
What if there are 2 interceptors and I need to disable 1 based on the body of request. How do we handle this situation?
Nice video.Please keep making such videos in more depth and from interview point of view.I faced this question in an interview. Thanks.
Best one...Thanks and Congratulations in advance for the success you will achieve soon...keep posting...All The Very Best...This is the first video that I watched from your channel...and subsctibed immediately :)
Thank you. Glad you liked it.
Best teacher, and software dev ever!
Thank you!
Hands off, one the best videos about Spring interceptors. Good job!
Glad you liked it
Very nice demonstration. Can this strategy be used to log the incoming and outgoing json payload as well? Do you have any demonstration for logging the payloads. For example, when a post end point is invoked by the client, I want to log the json payload (request) sent by the client and the json payload (response) sent back to the client.
Absolutely. interceptor can be used for logging request/response. But depending on the type of http client you use, you may not need to write any custom interceptor just for logging. Can I know which http client you intent to use?
@@TheTechMojo Thanks for reply. The scenario I am dealing with is as follows: There is a spring boot rest api application that has exposed "get" and "post" endpoints. My requirement is to log the incoming request and outgoing response when these endpoints are called by any client. The client may be Postman or even an another rest api may call these 2 endpoints. The reason I am asking this question is because I have read that once interceptor has read the incoming request, the request is considered to have been consumed and hence controller will not receive any request at all and throw exception.
Alright. That's pretty simple. Check out this example. github.com/StackTipsLab/spring-boot-tutorials/blob/main/spring-interceptor/src/main/java/com/stacktips/interceptors/LogHandlerInterceptor.java
you can write beans for commandLine runners returning a lambda instead of creating classes.
Hello You are videos are very clear. Waiting for another video with another hot topic.
Thank you very much. working on few more videos
The best tutorial on migration using flyway from the whole RUclips!
Thank you!
This is the best tutorial on springboot flyway integration
Do plz explain the shortcuts too on how to use these intellij feature mate
Hello Sir, This is the first video of yours that I have watched, and I immediately subscribed to your channel because I was so impressed with the way you explain and the topics you cover. Today, for the second time, an interviewer asked me about interceptors, and I didn't have a single line of response. However, after watching your video and practicing as you explained, I can now confidently discuss this topic and implement it in my projects as well. I really want to thank you for explaining such an important topic on a free platform. The clarity of your explanation reflects your deep knowledge and experience. Please continue to post content like this, which is rarely found on RUclips. Once again, thank you so much, sir. 🙏
Thank you so much for your amazing feedback! I love to have you as part of this community. ~Nilan
Good to catch you bro, Waiting for more Content ☺
chapter-2 ???
more than 1/3 of this video is covered by a tile linking to another video by this author. Right when the important part comes.
Read this article with full source code here: stacktips.com/articles/validating-configurationproperties-in-spring-boot
It is recommended to use record instead of class on this case
If you're using Java 17 or higher. Absolutely you should go for records. However, for java records we need to remove `@Component` annotation and explicitly define the bean registration either by using `@EnableConfigurationProperties` or define `@Bean` annotation in one of the `@Configuration` classes.
Thanks for this tutorial
very nice explanation from beginner to experience. Thanks you
So nice of you
Read this article here: stacktips.com/articles/using-flyway-for-database-migration-in-spring-boot
Thanks! The explanation was really awesome. I'm expecting more from you.
Glad you liked it!
Thanks, video was useful for me 👍👍
Thanks
How to use jwt along with interceptor
How can I make it circular?
Please post video on adding requestId in a log using MDC and interceptor for each thread
Thanks for this video ! Very detailed explaination and good presentation.
I have one doubt, for unauthorized how did you send that json response ?
The exception thrown from the controller is handled in the @ControllerAdvice. Checkout this example code github.com/StackTipsLab/spring-boot-tutorials/blob/main/testing-movies-api/src/main/java/com/stacktips/movies/api/GlobalExceptionHandler.java
Clean🤌
One of the best explanation found on RUclips about interceptor😍
Thank you very much! Kind words as such push me to create more such informative contents!
explaination is so good.
Thank you 👍
Glad you liked.
Great 👏❤
Very nice explanation and example. Thank you sir..
Thank you
Great one
Please make a detailed video on Spring Boot basics, like is it mandatory to have main method in an spring boot app to start the application, if not, then how will the SpringApplicaitonCOntext be initialised looking forward for more spring content from you
Isn't the main method non mandatory if you are using war and mandatory if you are using an IDE for providing an executable Jar file?
As we are using Spring Boot with embedded Tomcat in this example, the main() method is required.
Please keep making these videos. I need this dosage of clean & compact representation. Loved it.
Glad you liked it. Thank you.
Good explanation. I have a question here - is there a way to modify the request in the interceptor before it reaches the controller?
Yes that is possible using interceptor. You could also achieve that using servlet filters.
Excellent, very good video
the bottom text is not visible . I mean the channel name and title is blocking the view
Thanks for flagging. I am a YT shorts noob. I realized that after publishing it. 👋
Thanks for this great video. Hope to see more. Thanks again
Thank you
Can you create videos on springboot interview questions for fresher and experienced ?
Thank you Udit. I will probably consider that.
Read this article here stacktips.com/articles/replace-tomcat-with-jetty-or-undertow-in-spring-boot
Read this on my blog: stacktips.com/articles/how-to-use-interceptor-in-spring-boot Source code: github.com/StackTipsLab/spring-boot-tutorials/tree/main/spring-interceptor
Read this on my blog: tinyurl.com/45a6fs2v
Excellent Explaination. Simple and straight to the point. Keep posting videos that could help the Java community. But I have doubt like whatever the examples that you have demonstrated can be achieved via servlet filters. Better if you would have explained with some example where using Interceptor gives an edge over the Servlet Api
Yes. Interceptors are convenient as they have spring context.