Spring Boot With MongoDB CRUD Example | Java Techie

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ม.ค. 2025

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

  • @seekndstroy2560
    @seekndstroy2560 4 ปีที่แล้ว +3

    Excellent tutorial for a beginner in Spring framework. Probably the only tutorial where I understood what's happening around while combining mongo with spring. Thanks again.

  • @anands53
    @anands53 ปีที่แล้ว +4

    You never disappoint with any unwanted stuff in any of your videos. Stays on point. Clear and crisp. You got a subscriber.!

  • @saurabhrangnekar
    @saurabhrangnekar 3 ปีที่แล้ว +5

    Great video. Direct to the point. No fluff.

  • @swaroops3316
    @swaroops3316 2 ปีที่แล้ว +1

    Very calm explanation, no hassle . Very nice to understand this concept. Thank you

  • @parthec1
    @parthec1 3 ปีที่แล้ว +1

    Thanks for the video, quick and precise video ,,,it will help me to start with spring boot+mongo db integration,,keep making such videos,,,

  • @pulipoornashekarreddy8026
    @pulipoornashekarreddy8026 3 ปีที่แล้ว +1

    This is a very good tutorial for beginners who are starting Spring with MongoDB

  • @vikasbalani6378
    @vikasbalani6378 2 ปีที่แล้ว +3

    The tutorial what I was looking for!! Thanks Man!! Short , Crisp and brilliantly understandable!

    • @kondareddy5176
      @kondareddy5176 2 ปีที่แล้ว

      Y we use that postman application

    • @ShinAkuma
      @ShinAkuma 2 ปีที่แล้ว

      @@kondareddy5176 For sending requests to Rest endpoints. With browser you can only do GET requests.

    • @kondareddy5176
      @kondareddy5176 2 ปีที่แล้ว

      @@ShinAkuma without postman we can't connect that spring boot to mongodb

  • @aerosasi
    @aerosasi 4 ปีที่แล้ว +6

    God thank you soooo much . Was searching for this tutorial the enitire internet .. Thanks a lot !

  • @soumitralahiri100
    @soumitralahiri100 2 ปีที่แล้ว +1

    Excellent instructions - very easy to follow along and the application worked as expected.

  • @hegderaghav
    @hegderaghav 5 ปีที่แล้ว +4

    Very good tutorial that covers everything to start with MongoDB and Java.

  • @shubhammguptaa
    @shubhammguptaa 5 ปีที่แล้ว

    One of the best tutorial on this topic. Explained all the things in very easy language. Thank you so much !!!

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว

      Thanks Shubham , stay tuned !! For more update

  • @priyadharshinis2024
    @priyadharshinis2024 2 ปีที่แล้ว +1

    Hi, Thank you so so much for this video. On timely it helped me a lot .Keep going.Once again Thank you so so much.🙏

  • @nileshdongre5794
    @nileshdongre5794 3 ปีที่แล้ว +2

    Good and Simple Example to understand. Thank you very much

  • @sadrequiem
    @sadrequiem 5 ปีที่แล้ว +6

    Good tutorial. It got me going right away with Mongo and Spring. It's very similar to working with relational dbs.

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

    Jesteś totalnym gitem dzięki tobie jestem programistą zarabiającym 20k miesięcznie i jeżdżę teslą sport carbon.

  • @gauravverma-xs2sl
    @gauravverma-xs2sl 4 ปีที่แล้ว +2

    sir, you are awesome the way of your explaination is like WOW...............sir plz make a e commerce website project using spring boot..... i think this is very helpful for everyone..........thank you in advance

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว +1

      Ok will do that
      Some shopping kart API with security am planning to do

  • @MightyMike55
    @MightyMike55 4 ปีที่แล้ว +3

    Awesome and well put together tutorial. I found it very precise and pragmatic. Thanks and you earned my subscription to your channel

  • @bhargavi_Veeru
    @bhargavi_Veeru 2 ปีที่แล้ว +1

    Great video... Thanks for your patience and explanation.. Please make a video on spring Boot + Mong dB+ elastic search

  • @manueldiera6781
    @manueldiera6781 3 ปีที่แล้ว +4

    Thank you for such a clear and concise explanation. You covered exactly what I needed and in a short amount of time. Subscribed!

  • @rahul-java-dev
    @rahul-java-dev 3 ปีที่แล้ว +1

    Thanks for Sharing such a helpful video.

  • @ritulkumar1211
    @ritulkumar1211 5 ปีที่แล้ว +1

    Thank you soo much, sir. It was very easy to get things right. Very good explanation.

  • @ArshadKhan007
    @ArshadKhan007 6 ปีที่แล้ว +1

    very well Explained Basant Sir......!!

  • @rabindrasahu3610
    @rabindrasahu3610 6 ปีที่แล้ว +1

    Basanta bro thank you so much for shairing your knowledge to us.

  • @9803117003
    @9803117003 ปีที่แล้ว +1

    Awesome 👏

  • @NexonRider21
    @NexonRider21 6 ปีที่แล้ว +1

    Very nice explanation bro.. keep it up....👌👌👍

  • @Liz-rz4pq
    @Liz-rz4pq หลายเดือนก่อน +1

    you are a life saver

  • @simashpokharel6044
    @simashpokharel6044 3 ปีที่แล้ว +1

    omg dude you have answer to all my questions :)

  • @jaganasahu1220
    @jaganasahu1220 4 ปีที่แล้ว

    Thanks bro.. it's helps to all of your subscriber.. nice explanation..

  • @prayagbhasin9192
    @prayagbhasin9192 2 ปีที่แล้ว +1

    Sir very nicely explained pls make one with front end also how to take data from user in web UI and update data in mongo db

    • @Javatechie
      @Javatechie  2 ปีที่แล้ว +1

      Okay i will do that

  • @ravippareek933
    @ravippareek933 3 ปีที่แล้ว +1

    awesome.....keep helping

  • @MrSaurus
    @MrSaurus 2 ปีที่แล้ว

    At 15:45, I am having an issue. It does not seem like my program has any errors, because my console is not telling me that. However, my console is not showing me a link. Also, when I try putting the project path into Postman, I keep getting a 404 error. Do you know why this is?

    • @Javatechie
      @Javatechie  2 ปีที่แล้ว

      Please check this video th-cam.com/video/qVNOw9TWwxo/w-d-xo.html

    • @MrSaurus
      @MrSaurus 2 ปีที่แล้ว

      @@Javatechie I am using Eclipse, but in that video, you use IntelliJ. Would the video still help me?

  • @girish9841
    @girish9841 3 ปีที่แล้ว +1

    Excellent bro 👌

  • @faramirez88
    @faramirez88 2 ปีที่แล้ว +1

    Thank you, very helpfully.

  • @fjhiuenjey
    @fjhiuenjey 3 ปีที่แล้ว +1

    Nice tutorial, very clear!

  • @andreshun4005
    @andreshun4005 4 ปีที่แล้ว

    Thanks for the video!!! You have no idea how much it helped!!!

  • @soknatchan3657
    @soknatchan3657 5 ปีที่แล้ว +1

    Very good. Thanks you! I easy to understand with your training.

  • @azazul_haque
    @azazul_haque 3 ปีที่แล้ว +1

    Thanks for Sharing It helped me alot.

  • @smartEngineerShinton
    @smartEngineerShinton 3 ปีที่แล้ว +1

    If we give the same booke name it should throw an exception or validate it with unique = true. Can you do a video on that

  • @janakapushpakumara6755
    @janakapushpakumara6755 6 ปีที่แล้ว +1

    superb lesson.. I got the every thing what I need to know. thank u

  • @AnemUday
    @AnemUday 6 ปีที่แล้ว

    Nice video, clear and crisp. Thanks for sharing.

  • @kizaru.p3724
    @kizaru.p3724 5 ปีที่แล้ว +1

    Thank you for this example, it save my time.

  • @kossitokpe5579
    @kossitokpe5579 3 ปีที่แล้ว +1

    Thanks you for this excellent tutorial

  • @kadamsatyajit
    @kadamsatyajit ปีที่แล้ว +1

    Nice tutorial

  • @rexsam3134
    @rexsam3134 4 ปีที่แล้ว

    Good one. Learnt momgodb from this tutorial but need to try installing it on windows 10

    • @rexsam3134
      @rexsam3134 4 ปีที่แล้ว +1

      I used the zip version for downloading MongoDB but I dont see the installation exe in it and dont see Compass too on my desktop. My laptop doesnt allow the mongod.bat to run from the bin folder

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      Please checkout in TH-cam , you can get installation steps

    • @rexsam3134
      @rexsam3134 4 ปีที่แล้ว

      @@Javatechie The Compass does not work properly with 4.2.8 and I had to download Compass separately and configure the same. Thanks neways for MongoDB. Lookin forward for more complex commands as very few real time examples available from the admin perspective. Please refer to manual reference commands

  • @venusgoyal4705
    @venusgoyal4705 3 ปีที่แล้ว

    Perfect, very well articulated, thanks!

  • @valcmeza
    @valcmeza 3 ปีที่แล้ว +1

    Awesome tutorial!

  • @LuciferPlaying
    @LuciferPlaying 4 ปีที่แล้ว +2

    Love this. You have no idea how helpful this was.
    BTW, I have a question,
    This is a simple project with one collection, so what is the best file/folder structure to go with for a little bit bigger project which have 6 or 7 collections? Thanks!!

  • @vaishnudevojha906
    @vaishnudevojha906 4 ปีที่แล้ว +1

    Very helpful Sir, thanks so much

  • @babycodeur5594
    @babycodeur5594 2 ปีที่แล้ว +1

    Thank you so much, I love you.

    • @babycodeur5594
      @babycodeur5594 2 ปีที่แล้ว

      with the repo in extra, this is what hapiness looks like

  • @Anna-tl2tb
    @Anna-tl2tb 4 ปีที่แล้ว +2

    Thank you! Can you also, please explain how to create geographic index, how to use it in the search. Thank you

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      I will check and update you

  • @codingworld6762
    @codingworld6762 5 ปีที่แล้ว +1

    Good explanation 👏

  • @tejamanu7353
    @tejamanu7353 11 หลายเดือนก่อน +1

    Hi Basanth,
    Hope you are doing well. Thanks a lot for the wonderful Tutorial.
    I Have couple of questions to ask,
    1. When I am trying to make a http request call using postman, I can see the http response. However, In the MongDB Compass GUI, I can only see the data in object format, I am unable to see all the data fields and values. Could you please assist on the same?
    2. Also, I have used Lombok annotation in my Model class but when I am trying to get/call the variable in my controller class it says getvariable method is not created. Please help me on this. (I have added Lombok in my pom.xml and jar is also available in my maven dependencies)

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

      Hello buddy you need to configure Lombok in your IDE that will resolve both the issue

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

      @@Javatechie What does it mean when you say configuring Lombok in IDE, Basically I have included Lombok dependency in my pom.xml and also added @Getter & @Setter annotations in my model class as well.
      Please assist me on the same.
      Also, when I am running my spring boot application. In the video explained by you, your console shows the end points and it also says cluster information.. However, I am not able to see that level of traces in my Ide console.

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

      @tejamanu7353 if you are using IntelliJ then add Lombok plugin and enable it . That’s what configuration you need to do

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

      @@Javatechie I am using eclipse IDE as of now and facing this issue.

    • @tejamanu7353
      @tejamanu7353 11 หลายเดือนก่อน +1

      Hi Basanth,
      Both My issues are fixed:
      1. As I am using eclipse, I had to install the Lombok jar into my IDE.
      2. The reason why I am unable to get the response when make a http getBooks call is that as per the MONGODB documentation whatever field/variable we give as an "id" or tagged with @id annotation, The data type should either be "String" or "BigInteger" .
      If we give it as a int(It is showing error as :
      It is strange that "int" data type worked in the video.

  • @ameeralikhan9288
    @ameeralikhan9288 5 ปีที่แล้ว +1

    need help with below error
    {
    "timestamp": "2019-10-09T16:14:02.918+0000",
    "status": 500,
    "error": "Internal Server Error",
    "message": "E11000 duplicate key error collection: Bookstore.Book index: _id_ dup key: { _id: 0 };
    "path": "/saveBook"
    }
    even when i am giving different id

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว

      Stop your server and try to give different @document

  • @антонанкудинов-м8п
    @антонанкудинов-м8п 5 ปีที่แล้ว +2

    Mate, i just did everything as you showed but i got empty json docs for FindAllBooks and empty document with id=0 for Add. No java and api tester errors, but everything is empty. My package name is different, but i dont think it matters. Do u have any ideas?

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว

      Can you check in your mongo db ? Whether document created or not ?

    • @антонанкудинов-м8п
      @антонанкудинов-м8п 5 ปีที่แล้ว

      @@Javatechie i have 3 documents, i have added them before start the app. Whats interesting, FindAllBooks returns 3 empty docs: [],[],[]. Post method creates document with only _Id field = 0 whatever i do. it's not a problem i think, anyway i can create docs in Compass itself, but i want Find method work :)

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว

      @@антонанкудинов-м8п do you have setter getter method in your entity ?

    • @антонанкудинов-м8п
      @антонанкудинов-м8п 5 ปีที่แล้ว

      @@Javatechie Yep. in model -> Book.java i got @Getter and @Setter for Book class. They are correctly imported

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว

      @@антонанкудинов-м8п yes but did you configured lombok in your development IDE ?
      Try to print one getter value while saving document to mongo

  • @BiharGaurav
    @BiharGaurav 2 ปีที่แล้ว +1

    if mongodb is installed is some other ip, where to define that IP?

  • @abhishekpatidar9903
    @abhishekpatidar9903 3 ปีที่แล้ว

    Mongodb is unstructured database, but by creating a Book class in spring boot, we created it structured. is it so? if yes then how i can save unstructured entities?

  • @santhoshram1783
    @santhoshram1783 4 ปีที่แล้ว

    Superb tutorial ✌️.

  • @shivamtomar7426
    @shivamtomar7426 5 ปีที่แล้ว +1

    Thanks for providing such a wonderful learning

  • @ameeralikhan9288
    @ameeralikhan9288 5 ปีที่แล้ว +1

    bro for me eclipse is not able to compile book getid getter methods using lombok anotation as you did
    as it is easily compiling for you...help.

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว

      Please do set-up lombok in your eclipse
      Follow below link
      javagyanmantra.wixsite.com/website/single-post/2018/02/11/How-to-configure-Lombok-in-eclipse

    • @thatchert2159
      @thatchert2159 3 ปีที่แล้ว

      Same issue

  • @Vinsmokeafc
    @Vinsmokeafc 5 ปีที่แล้ว +2

    what if we want to return only some fields of the object model?

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว +2

      Create separate pojo for response with required field

  • @piyushatram4467
    @piyushatram4467 4 ปีที่แล้ว +1

    I followed the steps from the vdo, but after executing from postman i am unable to load data from spring boot to mondodb. its inserting default value for ex. age=0,mobile=0..?

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      Did you configured Lombok in your IDE

    • @piyushatram4467
      @piyushatram4467 4 ปีที่แล้ว +1

      @@Javatechie no I'll try this now ..! Thanks for replying

    • @saketkumar8229
      @saketkumar8229 3 ปีที่แล้ว +1

      @@Javatechie I have configured still its passing as 0.

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      What IDE you are using?

    • @saketkumar8229
      @saketkumar8229 3 ปีที่แล้ว

      @@Javatechie eclipse version 2021-03

  • @ajithanalluri4936
    @ajithanalluri4936 3 ปีที่แล้ว +1

    i am new to MongoDB, in sring boot i am facing org.springframework.data.mapping.MappingException: into type int but didn't find a PersistentEntity for the latter! this error
    Help me with this error

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      Please share complete error stack to javatechie4u@gmail.com

  • @serdcevputi
    @serdcevputi 3 ปีที่แล้ว +1

    Why in postman i successfully added my data and in mongodb i don't see this data?

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      Configure Lombok in your IDE

    • @serdcevputi
      @serdcevputi 3 ปีที่แล้ว

      @@Javatechie i solved this problem thanks man

  • @abrown1299
    @abrown1299 4 ปีที่แล้ว +1

    excellent turorial

  • @purshottamxp
    @purshottamxp 5 ปีที่แล้ว +1

    Great work bro

  • @ankushanpat273
    @ankushanpat273 2 ปีที่แล้ว

    Hi, I am upgrading Java 8 to Java 11 with spring boot 2.6.6 with mongodb
    While upgrading index is not created
    Same working with java 8
    You know this issue

  • @supriyanimmakayala3928
    @supriyanimmakayala3928 4 ปีที่แล้ว +1

    sir i did same wt u have done but when i do in postman i am getting error:notfound, that is 404 error wt can i do

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      Supriya , 404 us specific to wrong URL mapping please verify your url in controller and compare with your postman URL
      Is both are same ?

  • @sag530
    @sag530 5 ปีที่แล้ว +1

    Thanks sir for this video !!

  • @shashankmarri1056
    @shashankmarri1056 4 ปีที่แล้ว

    Excellent video.

  • @archanamundaye8391
    @archanamundaye8391 5 ปีที่แล้ว

    Is there envers support for spring-boot-starter-data-mongodb? We're using spring data mongo and we want to implement Auditing support to documents when they are inserted,updated , deleted like it's there in spring-data-jpa-envers i.e. by having another collection with name as myCollection_Aud which will have all such entries for audit

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว

      Am not sure whether enver support or not but for mongo we can go for traditional auditing using audit listener so please check my first audit tutorial

    • @archanamundaye8391
      @archanamundaye8391 5 ปีที่แล้ว

      @@Javatechie in traditional audit it only adds those 4 fields (createBy,ON, lastModifiedBy n ON) in current document. But I want to add those (like envers does) in different "MyCollection_Aud" collection.

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว

      @@archanamundaye8391 I will check and let you know

  • @balajikrishanasamy7029
    @balajikrishanasamy7029 ปีที่แล้ว

    Bro u run the main class on Java know the path variable doesn't show on my device for ex: mapped request and all delete find etc.....

  • @meghac3024
    @meghac3024 4 ปีที่แล้ว +1

    Can you please help how to print data which is in mongo db cluster using spring boot microservices... please help me in this

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      Where you want to print

  • @vijaych
    @vijaych 4 ปีที่แล้ว +1

    Where you have configured Mongodb server details? I am getting issue..

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      I configured in application.properties , may know your issue
      If possible share error log please

  • @shahjadealam9870
    @shahjadealam9870 2 ปีที่แล้ว +1

    Hello,
    I want to connect mongo Db from my Spring Boot application to Production Database.
    I need to set SSL = true
    How can I do this from the configuration file or what are the ways to set SSL .
    Thanks
    Shahjade

  • @dhaneshkj5744
    @dhaneshkj5744 3 ปีที่แล้ว +1

    excellent

  • @tauheedAlzohar
    @tauheedAlzohar 2 ปีที่แล้ว

    can you perform update operation with mongo db and spring boot

  • @anandjaisy
    @anandjaisy 4 ปีที่แล้ว +1

    Thanks for the video, can you please make a video on Micronaut + Reactive Mongo DB CRUD operation.

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      Okay I will try this

    • @anandjaisy
      @anandjaisy 4 ปีที่แล้ว +1

      I never got a response from you, about the videos I have commented on lots of your videos

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว +1

      Hi Anand sorry for inconvenience , am also one working employee so based on viewers demand always I tried to prepare video .
      So please do coperate

    • @anandjaisy
      @anandjaisy 4 ปีที่แล้ว +1

      @@Javatechie can you please upload this ASAP,

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว +1

      @@anandjaisy I will try to do this ASAP

  • @nicholaswhite7351
    @nicholaswhite7351 3 ปีที่แล้ว +1

    How to access the database from Spring Boot application remotely, without running mongod?

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      You can use cloud mongo

  • @subratdalai6238
    @subratdalai6238 2 ปีที่แล้ว +1

    how to give an exception if data is not found like "NO data existing with ithis id"

    • @Javatechie
      @Javatechie  2 ปีที่แล้ว

      Please check out the method of this
      th-cam.com/video/qVNOw9TWwxo/w-d-xo.html

  • @arjunagarwal2248
    @arjunagarwal2248 3 ปีที่แล้ว

    the changes were not reflecting for me in mongoDb compass
    can someone please help...

  • @hrushiamle5457
    @hrushiamle5457 3 ปีที่แล้ว +1

    Thank You ❤️

  • @denismugane2765
    @denismugane2765 4 ปีที่แล้ว +1

    Good tutorial on point,how do u apply custom query on the repository especially select

  • @kondareddy5176
    @kondareddy5176 2 ปีที่แล้ว

    When I followed the same video i am creating the project error came error creating bean with name mongoclientsettings

  • @akailok
    @akailok 4 ปีที่แล้ว

    It's good tutorial,but very basic.you can create mini project which can help millions.

  • @himanshuchugh4257
    @himanshuchugh4257 4 ปีที่แล้ว +1

    The data u entered seems structured, i heard mongodb is used for adding unstructured data, how can i insert unstructured data??

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว +1

      As far I understand Sturtural data can be store in RDBMS

    • @himanshuchugh4257
      @himanshuchugh4257 4 ปีที่แล้ว +1

      @@Javatechie thats what, i couldn't find any difference in mysql and mongodb after watching your tutorial, i watched one another tutorial which was the same as yours, can you help me find practical difference in mysql and mongodb by storing unstructured data with a video tutorial?

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      Could you please check my RDBMS and NoSQL comparison video to get concrete picture please

    • @himanshuchugh4257
      @himanshuchugh4257 4 ปีที่แล้ว

      @@Javatechie i just saw that video,u have mentioned that nosql is used to store unstructured data, but how can i store unstructured data in mongodb??
      I saw this tutorial but in this tutorial you are storing structured data in mongodb!

  • @Saravanan-lj9so
    @Saravanan-lj9so 4 ปีที่แล้ว

    Good work.

  • @sritamjagadev5860
    @sritamjagadev5860 5 ปีที่แล้ว +1

    Good tutorial indeed

  • @lakshmichandhana
    @lakshmichandhana 4 ปีที่แล้ว

    The data that i add from postman is not getting reflected in mongo db can u help me to fix this sir?

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      Check variable name should same as your input request because this is case sensitive

    • @lakshmichandhana
      @lakshmichandhana 4 ปีที่แล้ว

      @@JavatechieMongo db collection is displaying _id and _class:"Main.Register" main is the package name in which the Register.java is residing,I am creating springboot for registration

  • @Credi44
    @Credi44 3 ปีที่แล้ว +1

    i am gettng 404 error in postamn but no errors in eclipse. please tell mewhat to do

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      Please check the URL properly

    • @Credi44
      @Credi44 3 ปีที่แล้ว +1

      @@Javatechie now that 404 error is gone. When i try to insert the first json object it goes into the db but if i try to insert the second element, it says duplicate key error. I checked the mongo db using compass and in that i saw that the key value is 0 and the new entry is also trying be initialised to 0 only. The other attributes like name and author name are not even shown. Can you please help me with this? I have been struggling all day!!

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      Please configure Lombok in your IDE

    • @Credi44
      @Credi44 3 ปีที่แล้ว +1

      Can you please tell me how if you don't mind? I added the lombok dependencies in springboot in the starting like you showed. Should i do something else? thank you

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      What IDE you are using if it is intelij then simply add Lombok plugin and restart your intelij

  • @saketkumar8229
    @saketkumar8229 3 ปีที่แล้ว

    i am getting below error
    E11000 duplicate key error collection: USCC.PreTro index: _id_ dup key: { : 0 }; nested exception is com.mongodb.MongoWriteException: E11000 duplicate key error collection: USCC.PreTro index: _id_ dup key: { : 0 }

  • @only_pps
    @only_pps 6 ปีที่แล้ว +1

    Thanks for the tutorial I have one question
    Is it required to create Database and collection before running the application

    • @Javatechie
      @Javatechie  6 ปีที่แล้ว +1

      No Not required , but it's recommend to create before you run

    • @only_pps
      @only_pps 6 ปีที่แล้ว +1

      Thanks I tried the same and it worked

  • @aishikbhattacharya4296
    @aishikbhattacharya4296 6 ปีที่แล้ว +1

    I am getting this error - The method save(Book) is undefined for the type BookRepository

    • @Javatechie
      @Javatechie  6 ปีที่แล้ว

      possible solution to check
      1. did you add spring-boot-starter-data-mongodb dependency in your pom.xml
      2. did you extends your BookRepository interface from MongoRepository
      please check this else let me know ,(better to share your git link)

    • @aishikbhattacharya4870
      @aishikbhattacharya4870 6 ปีที่แล้ว +1

      Hi, I was trying this from my office system this morning. I was getting erroneous results probably because of some proxy setting in my system which was maybe not allowing to download MongoRepository dependency properly. Now from my pc it is working fine. But I have a question on this context. How are we using methods like save or findAll of JPARepository without extending it

    • @Javatechie
      @Javatechie  6 ปีที่แล้ว +1

      Aishik cool. These methods are not part of JpaRepository... Actually all those crud methods inherited from spring data where jpa, Mongo are implemention of that ok

  • @yeongkim926
    @yeongkim926 4 ปีที่แล้ว +1

    Thank you 😊

  • @proconfusedtechie3867
    @proconfusedtechie3867 5 ปีที่แล้ว

    straight to the point

  • @BTEEEVANSH
    @BTEEEVANSH ปีที่แล้ว

    Sir , I am stuck to integrate springboot with the mongodb as it is showing error like javax.net.ssl.SSLException: Received fatal alert: internal_error , com.mongodb.MongoSocketWriteException: Exception sending message , I have tried it with jdk 11.8 and java 17 but issue continues would you guide me how can I solve it

  • @ritikasharma4893
    @ritikasharma4893 4 ปีที่แล้ว

    well explained!

  • @gkmedia6324
    @gkmedia6324 2 ปีที่แล้ว

    can we use mongodb in website instead of application

  • @melsaied101
    @melsaied101 4 ปีที่แล้ว +1

    That’s so great

  • @rockyteck7107
    @rockyteck7107 2 ปีที่แล้ว +1

    Hello Thanks for the video, I have tried this and able to start the server but am getting 404 error in the local host not able to hit get and post methods as well getting whitelabel error page
    Any Help from anyone will be helpful to me to learn on this topic

    • @Javatechie
      @Javatechie  2 ปีที่แล้ว

      Is your application up and running?

    • @rockyteck7107
      @rockyteck7107 2 ปีที่แล้ว +1

      @@Javatechie yes am able to see the console and tomcat is also started in port but when i tried in browser local host showing white label error and am not even seeing in the console the mappings of controller

    • @Javatechie
      @Javatechie  2 ปีที่แล้ว

      404 means you are accessing the wrong URL please validate your request url

    • @rockyteck7107
      @rockyteck7107 2 ปีที่แล้ว +1

      @@Javatechie i have validated the url as and still not able to see the mappings in console and 404 error is still not solved

    • @Javatechie
      @Javatechie  2 ปีที่แล้ว

      Mapping won't display in console.it seems spring unable to scan your beans either use proper package structure or just use @ComponentScan

  • @roshnidash5009
    @roshnidash5009 3 ปีที่แล้ว +1

    I am getting error in postman...can u resolve it please

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      What is the error

    • @roshnidash5009
      @roshnidash5009 3 ปีที่แล้ว

      @@Javatechie I am only getting id in mongodb not the bookname and author name

    • @roshnidash5009
      @roshnidash5009 3 ปีที่แล้ว

      @@Javatechie Please help me

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      Buddy configure Lombok in your IDE