The Tech Mojo
The Tech Mojo
  • Видео 16
  • Просмотров 49 043
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...
Просмотров: 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

Комментарии

  • @adityaprakash7471
    @adityaprakash7471 17 дней назад

    Can't we put both the schema models in v1__initmigration.sql

  • @dougnintzel4655
    @dougnintzel4655 Месяц назад

    This was helpful, thanks!

  • @CarolHuang-c1x
    @CarolHuang-c1x 2 месяца назад

    very well explained, could you please come up with a video about filter?

  • @user-bt5ck3lf9e
    @user-bt5ck3lf9e 2 месяца назад

    Got a clear understanding of how interceptors are used, defined, and called. Appreciate your efforts in making this video, Thank you.

  • @QuantumOmar
    @QuantumOmar 2 месяца назад

    this is helpful

  • @ViiShhaaLL
    @ViiShhaaLL 2 месяца назад

    What if there are 2 interceptors and I need to disable 1 based on the body of request. How do we handle this situation?

  • @karamjitsinghsehdev3451
    @karamjitsinghsehdev3451 3 месяца назад

    Nice video.Please keep making such videos in more depth and from interview point of view.I faced this question in an interview. Thanks.

  • @becurious113
    @becurious113 3 месяца назад

    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 :)

    • @TheTechMojo
      @TheTechMojo 2 месяца назад

      Thank you. Glad you liked it.

  • @maciejmaciek2967
    @maciejmaciek2967 4 месяца назад

    Best teacher, and software dev ever!

  • @kcchennupati
    @kcchennupati 4 месяца назад

    Thank you!

  • @bedelicks
    @bedelicks 4 месяца назад

    Hands off, one the best videos about Spring interceptors. Good job!

  • @abhishekomprakash4074
    @abhishekomprakash4074 4 месяца назад

    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.

    • @TheTechMojo
      @TheTechMojo 4 месяца назад

      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?

    • @abhishekomprakash4074
      @abhishekomprakash4074 4 месяца назад

      @@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.

    • @TheTechMojo
      @TheTechMojo 4 месяца назад

      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

  • @inzi27
    @inzi27 6 месяцев назад

    you can write beans for commandLine runners returning a lambda instead of creating classes.

  • @AslamShaik
    @AslamShaik 6 месяцев назад

    Hello You are videos are very clear. Waiting for another video with another hot topic.

    • @TheTechMojo
      @TheTechMojo 6 месяцев назад

      Thank you very much. working on few more videos

  • @AdamsProgrammer
    @AdamsProgrammer 6 месяцев назад

    The best tutorial on migration using flyway from the whole RUclips!

  • @peterabiodunokusolubo1541
    @peterabiodunokusolubo1541 6 месяцев назад

    This is the best tutorial on springboot flyway integration

  • @rajivbiswas1750
    @rajivbiswas1750 6 месяцев назад

    Do plz explain the shortcuts too on how to use these intellij feature mate

  • @Kartikonde
    @Kartikonde 7 месяцев назад

    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. 🙏

    • @TheTechMojo
      @TheTechMojo 7 месяцев назад

      Thank you so much for your amazing feedback! I love to have you as part of this community. ~Nilan

  • @srikanthveepuru2924
    @srikanthveepuru2924 7 месяцев назад

    Good to catch you bro, Waiting for more Content ☺

  • @mananagarwal9253
    @mananagarwal9253 8 месяцев назад

    chapter-2 ???

  • @pawelzieminski6717
    @pawelzieminski6717 8 месяцев назад

    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.

  • @TheTechMojo
    @TheTechMojo 8 месяцев назад

    Read this article with full source code here: stacktips.com/articles/validating-configurationproperties-in-spring-boot

  • @lts8683
    @lts8683 8 месяцев назад

    It is recommended to use record instead of class on this case

    • @TheTechMojo
      @TheTechMojo 8 месяцев назад

      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.

  • @siddharathadhumale3683
    @siddharathadhumale3683 8 месяцев назад

    Thanks for this tutorial

  • @balakrishnabalija1823
    @balakrishnabalija1823 8 месяцев назад

    very nice explanation from beginner to experience. Thanks you

  • @TheTechMojo
    @TheTechMojo 9 месяцев назад

    Read this article here: stacktips.com/articles/using-flyway-for-database-migration-in-spring-boot

  • @ManoG-tr2ww
    @ManoG-tr2ww 9 месяцев назад

    Thanks! The explanation was really awesome. I'm expecting more from you.

  • @brianriano1726
    @brianriano1726 9 месяцев назад

    Thanks, video was useful for me 👍👍

  • @gowrisankar2177
    @gowrisankar2177 10 месяцев назад

    How to use jwt along with interceptor

  • @shubhajit_07
    @shubhajit_07 10 месяцев назад

    How can I make it circular?

  • @ajitdighe3293
    @ajitdighe3293 11 месяцев назад

    Please post video on adding requestId in a log using MDC and interceptor for each thread

  • @ajitdighe3293
    @ajitdighe3293 11 месяцев назад

    Thanks for this video ! Very detailed explaination and good presentation.

  • @tejasmoolya9462
    @tejasmoolya9462 11 месяцев назад

    I have one doubt, for unauthorized how did you send that json response ?

    • @TheTechMojo
      @TheTechMojo 8 месяцев назад

      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

  • @girishanker3796
    @girishanker3796 Год назад

    Clean🤌

  • @rakeshkodam8843
    @rakeshkodam8843 Год назад

    One of the best explanation found on RUclips about interceptor😍

    • @TheTechMojo
      @TheTechMojo Год назад

      Thank you very much! Kind words as such push me to create more such informative contents!

  • @hackstreet781
    @hackstreet781 Год назад

    explaination is so good.

  • @shubhammowade.6019
    @shubhammowade.6019 Год назад

    Great 👏❤

  • @vinothkumar-p5q
    @vinothkumar-p5q Год назад

    Very nice explanation and example. Thank you sir..

  • @kapilthukral618
    @kapilthukral618 Год назад

    Great one

  • @DurgaShiva7574
    @DurgaShiva7574 Год назад

    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

    • @girishanker3796
      @girishanker3796 Год назад

      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?

    • @TheTechMojo
      @TheTechMojo 8 месяцев назад

      As we are using Spring Boot with embedded Tomcat in this example, the main() method is required.

  • @richikmajumder2904
    @richikmajumder2904 Год назад

    Please keep making these videos. I need this dosage of clean & compact representation. Loved it.

    • @TheTechMojo
      @TheTechMojo Год назад

      Glad you liked it. Thank you.

  • @saloniprajapati7879
    @saloniprajapati7879 Год назад

    Good explanation. I have a question here - is there a way to modify the request in the interceptor before it reaches the controller?

    • @TheTechMojo
      @TheTechMojo Год назад

      Yes that is possible using interceptor. You could also achieve that using servlet filters.

  • @saiprasanth159
    @saiprasanth159 Год назад

    Excellent, very good video

  • @Ihavetoreturnsomevideotapes
    @Ihavetoreturnsomevideotapes Год назад

    the bottom text is not visible . I mean the channel name and title is blocking the view

    • @TheTechMojo
      @TheTechMojo Год назад

      Thanks for flagging. I am a YT shorts noob. I realized that after publishing it. 👋

  • @isurucumaranathunga
    @isurucumaranathunga Год назад

    Thanks for this great video. Hope to see more. Thanks again

  • @UditSharma124
    @UditSharma124 Год назад

    Can you create videos on springboot interview questions for fresher and experienced ?

    • @TheTechMojo
      @TheTechMojo Год назад

      Thank you Udit. I will probably consider that.

  • @TheTechMojo
    @TheTechMojo Год назад

    Read this article here stacktips.com/articles/replace-tomcat-with-jetty-or-undertow-in-spring-boot

  • @TheTechMojo
    @TheTechMojo Год назад

    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

  • @TheTechMojo
    @TheTechMojo Год назад

    Read this on my blog: tinyurl.com/45a6fs2v

  • @sfgmbkmbksfg3722
    @sfgmbkmbksfg3722 Год назад

    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

    • @TheTechMojo
      @TheTechMojo Год назад

      Yes. Interceptors are convenient as they have spring context.