Spring JDBC Template Tutorial: Learn to build a full CRUD application in Spring Boot

  Рет қаралды 47,137

Dan Vega

Dan Vega

Күн бұрын

Пікірлер: 53
@Sunil_Veeramuthu
@Sunil_Veeramuthu Жыл бұрын
Thanks, Dan! Actually, the JDBC API would have sufficed; you don’t need the Spring Data JDBC from the starter page as you’re not using any of the Spring Data features in this tutorial. Honestly, I like the raw power of SQL, and using the JDBC API allows me to carefully think about the database interactions and have better control over the queries. Spring Data is enough magic already; JPA on top of it is a no-no for me.
@guitarDad100
@guitarDad100 2 жыл бұрын
Very nice work. I have worked with Spring Boot JDBC but i like you CRUD DAO set up. Much cleaner. Thanks for posting this video.
@MsPolish89
@MsPolish89 3 жыл бұрын
Thank you very much, this tutorial helped me a lot to undertand the basics of jdbc template.
@DanVega
@DanVega 3 жыл бұрын
You are welcome!
@michael-john4954
@michael-john4954 Жыл бұрын
Great video Dan!
@kmekky3870
@kmekky3870 2 жыл бұрын
Thanks a million Dan, we would love a follow up to this video with Rest API if you have the time.
@georgievvladimir
@georgievvladimir 2 жыл бұрын
Great tutorial! BTW the only think missing here is an example of getting one course that doesn't exists.
@fabrizziocordova5250
@fabrizziocordova5250 Жыл бұрын
Very useful and incredibly informative
@Deepakguptasky
@Deepakguptasky 2 жыл бұрын
Thank you Dan for this good work !
@DanVega
@DanVega 2 жыл бұрын
Thank you for watching!
@pryflack3646
@pryflack3646 2 жыл бұрын
Nicely done :) It would have been nice to briefly discuss the pros and cons of this tech against other similar solutions such as JDBI, mybatis (and maybe more?) I was also slightly confused why you didn’t use the @Repository annotation which could have been a little more descriptive?
@btryx9378
@btryx9378 2 жыл бұрын
Hi, how comes that at 24:11 we put the DAO interface in the constructor instead of the class that implements it (CourseJDBCDao)? I don't really get that part. Sorry if its a dumb question.
@ShaileshDagar
@ShaileshDagar Жыл бұрын
I have a Question. Around 16:55 you said that we need only one instance of "jdbctemplate", so why not make it 'static'?
@DanVega
@DanVega Жыл бұрын
If the variable was static it would only be accessible from static methods. By declaring the variable private we are ensuring its only available in our class and Spring will handle autowiring the instance in for us. The JdbcTemplate is a singleton scope so there will only be a single instance in the application.
@ShaileshDagar
@ShaileshDagar Жыл бұрын
Thanks for answering that. Looks like I need some reading on Beans Scope.
@MewchildyT
@MewchildyT 3 жыл бұрын
Thank you, very great video!
@DanVega
@DanVega 3 жыл бұрын
You are welcome!
@devoiddude
@devoiddude 3 жыл бұрын
Thank you so much for this video.
@vivekgupta309
@vivekgupta309 2 жыл бұрын
very well explained. I appreciate it.
@BrunoFPcovers
@BrunoFPcovers 3 жыл бұрын
Thank you Dan!
@jeevanthalluri2200
@jeevanthalluri2200 2 жыл бұрын
how to call stored procedure using jdbc template in spring boot frame work ? with in,out and inout parameters ? Hope i will receive the response
@dinobulja
@dinobulja 2 жыл бұрын
Why annotating class that talks to DB as @Component. Isnt @Repository more appropriate? Thank you
@siddharthasharma5644
@siddharthasharma5644 3 жыл бұрын
Can you show me an example how to create JavaFX project with Spring Boot? No tutorial I found of JavaFX + Spring Boot yet. I m from India and your new learner...I m waiting for that one. your JDBC Template is very easy to understand .
@michelchaghoury9629
@michelchaghoury9629 2 жыл бұрын
Great Vid i have a Question @Dan Vega if i am using Spring Data JPA and want to map a Query Result using @Query to a non entity (for example a record used as a DTO) how can i do it ?
@stakhovskiy
@stakhovskiy 3 жыл бұрын
Thanks a lot!
@DevMERNia
@DevMERNia 2 жыл бұрын
How do you model relations that have inheritance?
@wesleyjackson7524
@wesleyjackson7524 3 жыл бұрын
hi dan!, did you made the tutorial where you build the Rest APItalks with the DAO?
@caspianrobert7327
@caspianrobert7327 3 жыл бұрын
You prolly dont give a damn but does any of you know a method to get back into an instagram account? I stupidly forgot my account password. I would appreciate any assistance you can offer me.
@elonjackson5121
@elonjackson5121 3 жыл бұрын
@Caspian Robert Instablaster :)
@caspianrobert7327
@caspianrobert7327 3 жыл бұрын
@Elon Jackson Thanks so much for your reply. I got to the site thru google and im waiting for the hacking stuff now. I see it takes quite some time so I will get back to you later when my account password hopefully is recovered.
@sachinmankotia2291
@sachinmankotia2291 2 жыл бұрын
Thanks for this video :) One question, Do you have created video to work with multiple linked tables (example Student and Course tables having 1:M mapping) with Spring jdbc? With Spring JPA, its simple as we can define all mapping in entity class, But I want to implement that using Spring data JDBC.
@DanVega
@DanVega 2 жыл бұрын
I don't have anything yet but I will get that on the backlog. Thank you for the suggestion. In the meantime did you have a chance to look through our documentation? docs.spring.io/spring-data/jdbc/docs/current/reference/html/
@lastsaiyan9035
@lastsaiyan9035 3 жыл бұрын
thanks a lot, trying to transition to a java role from node.js have a java interview coming up, this helps
@xiaoyuli4703
@xiaoyuli4703 3 жыл бұрын
Hi there, Could you please explain for me that, when you create a constructor within the CoursePlatformApplication class, and the constructor accepted a DAO as a parameter, but how is DAO parameter got passed to the constructor, I saw you use the "dao" directly in the main function. Thank you.
@manaslovesbirds
@manaslovesbirds 3 жыл бұрын
through Spring's Constructor dependency injection
@ronyjohn376
@ronyjohn376 3 жыл бұрын
Is it worth it to upgrade from a Plain JDBC application to Spring JDBC? Is there a reason why you wouldn't suggest that approach?
@НаташаМаксимчук-ж3к
@НаташаМаксимчук-ж3к 2 жыл бұрын
Ndm
@darshanraut554
@darshanraut554 2 жыл бұрын
Why not keep it simple and avoid use of templates :(
@pryflack3646
@pryflack3646 2 жыл бұрын
Can you explain yourself more? I see what seems to be a nice abstraction here with, what seems to be, reduced boilerplate. What did you feel could be simpler?
@mr.RAND5584
@mr.RAND5584 7 ай бұрын
Optional.empty has console display unexpected end of JSON input at Json.parse(.....
@praveens2272
@praveens2272 Жыл бұрын
If you are working with database first approach and you need to write some complex queries with multiple table joins then Spring JDBC is life saver. No need to under estimate it. Spring data jpa is a good choice if you are developing brand new microsercive with code first approach and less complex database schema.
@jeevanthalluri2200
@jeevanthalluri2200 2 жыл бұрын
how to configure multiple data sources in a single spring boot project
@DanVega
@DanVega 2 жыл бұрын
Thanks for the suggestion. I will get that added to my backlog.
@krishnasurisetty1362
@krishnasurisetty1362 3 жыл бұрын
If we are using public CourseJdbcDaoImpl(JdbcTemplate jdbcTemplate) { this.jdbcTemplate = jdbcTemplate; } how is the jdbc template being initialized, It needs a DataSource object in it's constructor. Please let me know how this works. Does'nt the existing code gives a null reference
@sunilanthony17
@sunilanthony17 3 жыл бұрын
I need to use a database that only uses store procedures to perform CRUD operations which lands me here...Spring JPA/Hibernate is real clunky when it comes to store procedures. I also notice that query and queryForObject are deprecated. Can you show the replacement?
@DanVega
@DanVega 3 жыл бұрын
query will work and the last argument is any number of args jdbcTemplate.query(sql,rowMapper,id);
@sunilanthony17
@sunilanthony17 3 жыл бұрын
@@DanVega Yes, it will work if you suppress the deprecation warning but I was looking for what they are replacing it with if they are deprecating "query".
@artetl
@artetl 8 ай бұрын
Thank you. That’s useful!)
@gasparcalix2095
@gasparcalix2095 3 жыл бұрын
GRate work!!!! it help me alot!
@yarik83men51
@yarik83men51 2 жыл бұрын
Super, you save me a time
@ahmadraza7049
@ahmadraza7049 2 жыл бұрын
very good explanation really loved it 🙂
@gyorgyszabo3607
@gyorgyszabo3607 3 жыл бұрын
Thank you!
JAVA SPRING JDBC: CRUD БЕЗ ORM
21:19
Джавист
Рет қаралды 6 М.
Electric Flying Bird with Hanging Wire Automatic for Ceiling Parrot
00:15
когда не обедаешь в школе // EVA mash
00:57
EVA mash
Рет қаралды 2,9 МЛН
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 96 МЛН
Spring Tips: Spring Data JDBC
27:36
SpringDeveloper
Рет қаралды 20 М.
Spring Boot REST Service: How to build a REST API in Java
21:38
Spring Boot JDBC using JdbcTemplate
29:39
Telusko
Рет қаралды 77 М.
Electric Flying Bird with Hanging Wire Automatic for Ceiling Parrot
00:15