How Spring JDBC Auto configuration works internally ?🤔 Spring Boot Foundation tutorial | MySQL

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ส.ค. 2024
  • Ever thought ? how spring boot connects to database ? How Spring JDBC Auto configuration works internally ? How Spring auto configures the jdbc template and datasource ? This is one of the import concept which will build your Spring Boot Foundation. In this tutorial, We will be learning this topic with a practical approach which will prepare us for the spring boot Interview as well.
    To execute any sql statements over a database , first we need a connection object. The Datasource component takes connection creation responsibility which is later used by JdbcTemplate under the hood to connect to any database like MySQL before executing any SQL queries.
    If the DataSource and JdbcTemplate object creation has not done by the Developer , Spring boot does it by using its autoconfiguraiton feature. The components like DataSourceAutoConfiguration and JdbcTemplateAutoConfiguration does this work under the hood.
    In this video we have used different classes to create connection object which will be used by the framework under the hood. We have used DriverManager Datasource , Hikari connection pool, C3p0 connection pool , DBCP connection pooling example as well.
    A connection pool helps in creating a number of connections during the server bootstrap itself which is used by the framework before invoking any sql queries over the database. This helps in performance optimisation. Using the connection pool, a same connection can be reused numbers of time and helps in reducing connection creation time for each db operation. Hikari is used as a default Connection Pool in spring boot.
    Let’s learn how spring boot configures all these internally through autoconfiguration, if not set by the developer.
    Timestamp
    ------------------
    00:00:00 - A Question on Spring Boot Auto configuration
    00:03:29 - Spring Boot and JDBC API Integration
    00:18:26 - What is a Datasource ?
    00:23:30 - JdbcTemplate configuration
    00:28:33 - DriverManagerDatasource and it’s drawback
    00:37:53 - What is a Connection Pool ?
    00:45:56 - Spring Boot + Connection Pool (c3p0) implementation
    00:53:20 - How Spring Boot JDBC Autoconfiguration works internally?
    01:04:36 - DataSourceAutoConfiguration and
    JDBCTemplateAutoConfiguration
    #springboot #springboottutorial
    #springbootinterviewquestions
    For more free/paid courses visit
    www.seleniumexpress.com
    LINKS AND FREE LEARNING RESOURCES
    ========
    Watch my new mock interview series for java developers
    • Java interview questio...
    Watch my new Hello spring boot series
    • Spring Vs Spring Boot ...
    Watch Spring boot Hot topics
    • @Reposicotry Vs @Servi...
    Java Interview / Question and Answer series
    • Java collections inter...
    Explain spring Bean Lifecycle
    • REAL-TIME: Spring Bean...
    spring core
    • Spring framework tutor...
    spring mvc
    • Spring MVC course intr...
    spring mvc intermediate
    • [INTERMEDIATE] Spring ...
    Spring JDBC
    • Spring JDBC Course Pre...
    spring live project
    • #1 Build and Deploy A ...
    SPRING SECURITY COURSE[NEW]
    • Spring Security Course...
    For more courses visit
    www.seleniumexpress.com
    Any time you are getting stuck with issues, Feel free to ask for support.
    You can send mail to seleniumexpress@gmail.com
    you can ping me on my Facebook page
    / seleniumexpress
    Make sure to join my private Facebook page (Ask me here)
    “SeleniumExpress - Support"
    / 187000222361579
    you can ask for support in my website forum
    www.seleniumexpress.com
    Subscribe to my youtube channel
    / @seleniumexpress
    Follow me on Insta
    / selenium_express

ความคิดเห็น • 26

  • @SanjayKumar-by6oc
    @SanjayKumar-by6oc 9 หลายเดือนก่อน +3

    JDBC Auto configuration- I have been haunted by this magic- Thanks for pulling the blanket away!

  • @fullnaoufal
    @fullnaoufal 8 หลายเดือนก่อน +2

    I hope to see videos on Spring Data JDBC and the difference with Spring Data JPA :)

  • @sahukarinaveenkumar3188
    @sahukarinaveenkumar3188 หลายเดือนก่อน

    Super Explanation

  • @yatendra__singh
    @yatendra__singh 9 หลายเดือนก่อน +2

    Thank you so much for the exceptional knowledge you have....we are so grateful to you 🙏🙏

  • @LeoLeo-nx5gi
    @LeoLeo-nx5gi 9 หลายเดือนก่อน +2

    Truly amazing and in-depth explanations, thanks a ton!!

  • @Laggy_Panda
    @Laggy_Panda หลายเดือนก่อน

    Great

  • @vikramhpt
    @vikramhpt 8 หลายเดือนก่อน

    Very helpful 👏🏽

  • @attabou100
    @attabou100 9 หลายเดือนก่อน

    thanks a lot

  • @vndprasadgrandhi4344
    @vndprasadgrandhi4344 9 หลายเดือนก่อน

    Hi Bro,Expecting from you latest concepts.plz do waiting for that

  • @user-ot8bd7lu8d
    @user-ot8bd7lu8d 8 หลายเดือนก่อน

    Nice 👍👍 video

  • @ajitsinghbisht1419
    @ajitsinghbisht1419 5 หลายเดือนก่อน

    Thanks bro… can you create similar content on Distributed log tracing ?

  • @usaamaizm
    @usaamaizm 9 หลายเดือนก่อน

    Please create series on hibernate and core JDBC, servelts too. Thanks ❤

  • @srigakolapuatchuthasai5929
    @srigakolapuatchuthasai5929 9 หลายเดือนก่อน +1

    Thanks abhi❤

  • @santhoshchandran6952
    @santhoshchandran6952 9 หลายเดือนก่อน

    Hey Abhi, Thank you 😂

  • @sumanthkumar7060
    @sumanthkumar7060 9 หลายเดือนก่อน

    When will you start core Java ,jdbc servlet jsp classes

  • @ngbean7058
    @ngbean7058 9 หลายเดือนก่อน

    Abhliash do you have any kubernetes course

  • @pritamhippargekar1840
    @pritamhippargekar1840 9 หลายเดือนก่อน +1

    Incase thread pool, when thread complete it work, then it will go to dead state, then how it will go back to thread pool. What they have implemented under the hood.

    • @LeoLeo-nx5gi
      @LeoLeo-nx5gi 9 หลายเดือนก่อน

      Hi awesome even I had the same question ^_^

    • @rakeshpal8730
      @rakeshpal8730 9 หลายเดือนก่อน

      A Thread Pool is an alternative to creating a new thread per task to execute. Instead, a number of pre-created threads exist in a pool - into which you can submit tasks to be executed by these pooled threads. New tasks submitted to the pool are first stored internally in a queue. From this queue the pooled threads will take the tasks and execute them. Each thread in the thread pool executes in a loop that takes a new task from the internal task queue in the thread pool (or block if no tasks are available), executes the task, and then tries to take another task etc. repeatedly.
      If you want to know more about the internals, then you can read more about concurrency in multithreading and Executor framework.

    • @LeoLeo-nx5gi
      @LeoLeo-nx5gi 9 หลายเดือนก่อน

      @@rakeshpal8730 Hi Rakesh thanks for the brief but honestly we know all this, our question is different.
      Each thread dies after executing the "run" method then how has Threadpool done the implementation internally such that threads don't die but are rather re-used

  • @karunamoorthyramakrishnan2083
    @karunamoorthyramakrishnan2083 8 หลายเดือนก่อน

    i am in the exact doubt found this video

  • @shaiktappalameennawaz1046
    @shaiktappalameennawaz1046 9 หลายเดือนก่อน

    Sir when are you going to begin live courses

    • @SeleniumExpress
      @SeleniumExpress  9 หลายเดือนก่อน +1

      Just resumed the Live sessions from this week. You can raise an enquiry for the follow up. Incase you are a paid user, check your respective groups for updates.

    • @shaiktappalameennawaz1046
      @shaiktappalameennawaz1046 9 หลายเดือนก่อน

      Sir I wanna join new batches
      When can be they get started

    • @shubhamshivane766
      @shubhamshivane766 9 หลายเดือนก่อน

      @@SeleniumExpress Abhilash please start Spring security course