#14 Spring MVC and Layers

Поділитися
Вставка
  • Опубліковано 21 лис 2024

КОМЕНТАРІ • 103

  • @ЕвгенийВовк-ы7ь
    @ЕвгенийВовк-ы7ь 5 місяців тому +13

    Thank you so much for the error demonstration.
    It is very important for me!
    It shows that you don't have to be afraid of mistakes, you just have to deal with them.
    This video is very valuable!🙏

  • @yashwanthraj1146
    @yashwanthraj1146 5 місяців тому +34

    Spring made programming easy ❌ TELUSKO made Spring easy ✅

  • @jairramirez6900
    @jairramirez6900 5 місяців тому +6

    Thank you for sharing not just the results but the errors, it's good to see how somebody with good knowledge in programming deals with errors

  • @ameybhandari6865
    @ameybhandari6865 5 місяців тому +5

    Hello Navin sir, this playlist is going very well, usually I dont comment on videos, however the kind of dedication you are taking and the content that you are making is mind blowing. Thank you for this and keep uploading. We are waiting to learn these things.

  • @Devivl
    @Devivl 3 місяці тому +1

    You don't teach, you educate! Thank you!

  • @justicefor_sandwichlord
    @justicefor_sandwichlord 23 дні тому +1

    Bro's Teaching everything
    that's soooooo gooood
    goood to know how things work behind the scene so we can fix bugs pretty quickly

  • @premnath9727
    @premnath9727 4 місяці тому +17

    The problem why lombok is not working is due to IDE. Intellij doesn't understand the lombok features i.e getters , setters , constructors predefined method. To solve this error you need to install Lombok Plugin in your Intellij IDE

  • @abishekmagar8790
    @abishekmagar8790 5 місяців тому +2

    You're amazing Sir. King of Java

  • @sachinmehra-bt7jj
    @sachinmehra-bt7jj 3 місяці тому +5

    @Telusko Sir, The issue your are facing that port is already in use is because your SpringBoot application re run automatically so when you are trying to run it again it gave you that error .So you don't have to re run it Sir. 😊

    • @javidashwaqf
      @javidashwaqf 17 днів тому

      the actual problem is on place of restart if we run the already running program means it open in new terminal that's the issue

  • @naraynwetal6544
    @naraynwetal6544 3 місяці тому

    I really appreciate your hard work in creating such simple yet valuable content in your videos.

  • @kushal6065
    @kushal6065 3 місяці тому

    Thanks please don't stop making videos. I need it for my finaly year project

  • @likithkumar3212
    @likithkumar3212 3 місяці тому

    its teaching....it's a style of teaching... helps a lot 😍

  • @DanaO-su6xl
    @DanaO-su6xl 5 місяців тому

    Thank you for this video! Everything worked on my machine as well!

  • @stephena1156
    @stephena1156 3 місяці тому +1

    Multiple server instant have already been created and didn't stop properly.
    If you're using windows, type below command in cmd
    netstat -aon | find /i "listening" | find "your_port_no"
    Hit the enter button and then,
    Taskkill /F /PID "type_PID_id_of_current_port" and then hit enter
    If you're using linux
    ps -aux | grep tomcat
    kill -9 TYPE_YOUR_PID_ID
    Hope it will work

  • @arturkwiatkowski5019
    @arturkwiatkowski5019 24 дні тому

    This time your code works for me. I face strange issues sometime and most of the time reset of Intellij fix the problem.

  • @AjayKumar-go4jr
    @AjayKumar-go4jr 2 місяці тому +1

    spring made programming easy ❌ but he did... yes, Navin Reddy made programming easy 💥

  • @gonzalob.2428
    @gonzalob.2428 5 місяців тому

    Hi Navin!!!... the lombok works normally in my machine and it's typically you need to restart you system.

  • @lokeshkumarkondeti4312
    @lokeshkumarkondeti4312 Місяць тому +1

    @Telusko I've tried different ways about the issue that you got. So here is the solution other than restarting.
    As we are considering the Product as a simple model so it shouldn't have @Component annotation. So keep @Data annotation and execute it will work..
    Please correct me if I'm wrong..

    • @SHIVAMKUMAR-gj3td
      @SHIVAMKUMAR-gj3td Місяць тому

      Bruh, I tried with and without Lombok both and both were running good with having costructors and getter setters only, so, @Component was causing the issue, but I wanna know why?
      Don't we need an object of Product inside our IoC container?

    • @lokeshkumarkondeti4312
      @lokeshkumarkondeti4312 Місяць тому

      ​@@SHIVAMKUMAR-gj3tdHere the Product model is not managed by Spring IoC bcz we are instantiated manually in ProductService class.
      If we wanna make it handle by the spring IoC then
      we have to create a configuration class and write the list there and call them in the ProductService constructor .
      If needed we have to use @comoonentScan annotation to scan for components...
      Note: I took help of copiolot to get the clear info

  • @Aaaronka
    @Aaaronka 5 місяців тому

    You're very good at teaching. I can't wait for the next lesson!

  • @GuessGameFun
    @GuessGameFun 4 місяці тому

    Wow. amazing videos. Thank you for the videos Sir

  • @Yogesh-p3k
    @Yogesh-p3k 2 місяці тому

    You are Good...!!
    Explanation is Amazing!

  • @rohittripuraneni966
    @rohittripuraneni966 Місяць тому

    Thank you for making it easier to understand.

  • @AkashKumar10134
    @AkashKumar10134 2 місяці тому

    you could have just ran this in the cmd "netstat -ano | findstr :", which will provide you the port id and with port id you can stop the server port which was already running due to another console by following command "taskkill /PID /F" , andd its done the server port is no more running and ready to use for a new application.

  • @dragoon4060
    @dragoon4060 5 місяців тому

    Thank you for this video! Everything worked on my machine!

  • @user-cd8cg3yr1q
    @user-cd8cg3yr1q 4 місяці тому

    Thank you for the great video . please keep uploading more such kind of videos

  • @shakthiviviyn
    @shakthiviviyn 4 місяці тому

    THANKS FOR THIS AMAZING VIDEO!!! THANKS TELUSKO

  • @sonusangwan326
    @sonusangwan326 5 місяців тому +1

    Hi Sir, please upload videos on regular basis.

  • @chen8996
    @chen8996 2 місяці тому

    Really good lessons, keep updating please

  • @lootster
    @lootster 2 місяці тому

    00:03 Understanding request mapping in Spring MVC
    01:54 To send data from server to client in a suitable format.
    03:40 Creating a class to represent a product with specific attributes
    05:37 Introducing service layer in Spring MVC for separate business logic
    07:23 Creating package structure and defining service methods
    09:31 Troubleshooting port number issues in Spring MVC
    11:29 Implementing Spring MVC logic
    13:38 Troubleshooting issues with port number and code errors
    16:10 Testing APIs using different tools and understanding API usage

  • @orekisday
    @orekisday 5 місяців тому

    These vids are amazing. More uploads please

  • @NandinerdeneMandakh
    @NandinerdeneMandakh 2 місяці тому

    Appreciate your every video! Thank you

  • @akashjaiswal696
    @akashjaiswal696 5 місяців тому

    Great explanation, upload more lectures

  • @Sidex150-g1p
    @Sidex150-g1p 3 місяці тому

    This is premium level content for free NGL

  • @sonusangwan326
    @sonusangwan326 5 місяців тому

    Your content is superb✌️

  • @RealRameshBabu
    @RealRameshBabu 4 місяці тому

    For lombok, I think we need to install that lombok plugin from intellij marketplace and also that configure plugin shown at bottom right 5:13 needs to be clicked

  • @shaurya2608
    @shaurya2608 14 днів тому +1

    Thank you

  • @naraynwetal6544
    @naraynwetal6544 3 місяці тому

    Really lot of fun sir to learn spring boot

  • @Jenisha-tv2mi
    @Jenisha-tv2mi 3 місяці тому

    Appreciate the efforts!

  • @tarunkumarvella9157
    @tarunkumarvella9157 2 місяці тому

    In IntelliJ we have to enable runtime settings for lambok

  • @deshdeepaksingh1182
    @deshdeepaksingh1182 5 місяців тому

    these videos are really helpful

  • @movi_u
    @movi_u 2 місяці тому

    Love your videos!

  • @aishwaryasutar9042
    @aishwaryasutar9042 Місяць тому

    @Telusko , Amazing videos ! I was facing the same port issue while working with eclipse and I tried terminating that port exclusively and then restarting my java code, it works :) Command - lsof -i :8080 , then kill -9 Hope it works for you !

  • @cheguevara1396
    @cheguevara1396 3 місяці тому

    Great work sir

  • @Wisewolf09
    @Wisewolf09 4 місяці тому

    Same error was popping up in my machine server busy. I did this in command panel
    Step 1 = fuser 8080/tcp (check port running on localhost 8080)
    Step 2 = fuser -k 8080/tcp (To kill 8080)

  • @samplayz9557
    @samplayz9557 2 місяці тому

    you have to add lombok plugin to solve this issue

  • @pramodkajla
    @pramodkajla Місяць тому

    Looks like, You didn't enable Lombok IntelliJ plugin. You got popup to configure Lombok in intelliJ at 5.09 minute in video.

  • @suryavamsi3680
    @suryavamsi3680 5 місяців тому

    as it's taking time to upload videos, is there any other way that we can learn it fast?
    i mean any course in udemy?

  • @vishaldindalkop294
    @vishaldindalkop294 3 місяці тому

    Thank you for the video.

  • @Alcatraz-23
    @Alcatraz-23 5 місяців тому

    Top notch content!!

  • @JayJayJay007
    @JayJayJay007 2 місяці тому

    Great video

  • @JoshTonyKlementJ
    @JoshTonyKlementJ 5 місяців тому

    Nice Video Sir Thank You

  • @ShamanthAchar-u4f
    @ShamanthAchar-u4f 3 місяці тому

    Telusko ❤

  • @kishanrawatxo
    @kishanrawatxo 5 місяців тому

    Thank you sir for video ❤

  • @vaibhavmishra9890
    @vaibhavmishra9890 3 місяці тому

    make a default constructor in product for removing the error.

  • @pavankumar5449
    @pavankumar5449 5 місяців тому

    Lombok will work but use the annotations called @Setter and @Getter

  • @112yt
    @112yt 2 місяці тому

    need a separate video for Lombok please!

  • @johnrusselledomingo170
    @johnrusselledomingo170 5 місяців тому

    Thank you

  • @vajrakowtilyab4822
    @vajrakowtilyab4822 3 місяці тому

    Thank you SIR

  • @varunpalsingh3822
    @varunpalsingh3822 5 місяців тому

    thank you sir 🙂

  • @tampishach
    @tampishach 4 місяці тому

    Interestingly i was able to use lombok library

  • @pawarswapnil97
    @pawarswapnil97 4 місяці тому

    thank you!

  • @JenHsingHuang
    @JenHsingHuang 5 місяців тому

    I also had the issue with IntelliJ, 8080 still in use... that's annoying lol

  • @truthbetold_25
    @truthbetold_25 4 місяці тому +1

    Getting an empty list on my browser. Any suggestions to fix this?

    • @carinacodrea2738
      @carinacodrea2738 3 місяці тому +1

      The issue you're facing, where the response shows [{}, {}, {}] instead of the actual properties and values of the Product objects, is likely due to how the Product class is being serialized into JSON. By default, Jackson (the JSON library used by Spring Boot) serializes objects by their getters. So you need to create getter methods for all of the properties inside the Product class,or add @Getter lombok annotation :
      @Component
      @AllArgsConstructor
      @NoArgsConstructor
      @Getter
      public class Product {
      private int id;
      private String name;
      private double price;
      }

  • @DatHua-q3p
    @DatHua-q3p 2 місяці тому

    good job

  • @harshakkrishnaa2014
    @harshakkrishnaa2014 5 місяців тому

    Awesome video

  • @sandeep1727
    @sandeep1727 5 місяців тому

    Im getting this error "Consider defining a bean of type 'int' in your configuration."

  • @Rocky4375-v9y
    @Rocky4375-v9y 5 місяців тому

    CFBR ❤

  • @sonusangwan326
    @sonusangwan326 5 місяців тому

    Hi Sir, why are we using @Component annotation on Product class? We are not using it as a bean.

    • @kunalchhablani4549
      @kunalchhablani4549 5 місяців тому

      for modularity and encapsulation

    • @sonusangwan326
      @sonusangwan326 5 місяців тому

      How is that related here?

    • @code_manthra
      @code_manthra 2 місяці тому

      @Component is not necessary for Product class in this case, as we r manually creating object using new keyword inside Arrays.asList method

  • @pawana2116
    @pawana2116 5 місяців тому

    Lombok dependency problem sir

  • @KaturuRakesh
    @KaturuRakesh 2 місяці тому

    int range exceed

  • @harshalashi
    @harshalashi 3 місяці тому +1

    I am getting blank json. Please help

    • @deepak_jain
      @deepak_jain 3 місяці тому +1

      Even I was facing the same issue.
      package com.example.demo.model;
      import org.springframework.stereotype.Component;
      @Component
      public class Product {
      private int prodId;
      private String pName;
      private int price;
      // Default constructor
      public Product() {}
      // Parameterized constructor
      public Product(int prodId, String name, int price) {
      this.prodId = prodId;
      this.pName = name;
      this.price = price;
      }
      // // Getters and setters
      public int getProdId() {
      return prodId;
      }
      //
      // public void setProdId(int prodId) {
      // this.prodId = prodId;
      // }
      //
      public String getpName() {
      return pName;
      }
      //
      // public void setpName(String pName) {
      // this.pName = pName;
      // }
      //
      public int getPrice() {
      return price;
      }
      //
      // public void setPrice(int price) {
      // this.price = price;
      // }
      }

    • @Rohit-ft6qt
      @Rohit-ft6qt 2 місяці тому

      @@deepak_jain i am facing application failed to start

    • @extrimgaming3891
      @extrimgaming3891 2 місяці тому +1

      Same issue any solution to this

    • @extrimgaming3891
      @extrimgaming3891 2 місяці тому +1

      ​@@deepak_jainsame issue

    • @extrimgaming3891
      @extrimgaming3891 2 місяці тому

      @telusko

  • @sreerajrajeevan3389
    @sreerajrajeevan3389 5 місяців тому

    lombok library is always a problem for me as well

  • @AimanNorhisham-l2m
    @AimanNorhisham-l2m 2 місяці тому

    nice!

  • @theCHAD_666
    @theCHAD_666 5 місяців тому

    ❤❤❤❤❤

  • @Cruzox
    @Cruzox 2 місяці тому

    💝

  • @pranaypaul6361
    @pranaypaul6361 5 місяців тому

    layers simplified

  • @Gogul-ub4ll
    @Gogul-ub4ll 5 місяців тому

    Please daily upload video sir... what happened to you 😢

  • @MaximusHyde
    @MaximusHyde 5 місяців тому

    sudo lsof -nP -iTCP -sTCP:LISTEN

  • @GaryLee-j2v
    @GaryLee-j2v Місяць тому

    Lewis Ruth Young Shirley Robinson Richard

  • @based-david
    @based-david 3 місяці тому

    wass here

  • @juggernautthug6855
    @juggernautthug6855 2 місяці тому

    ncccccceeeeeeeeeeeeee

  • @killheist173
    @killheist173 5 місяців тому

    No sir Initially, lombok was not working for me as well, but after making some changes to the settings in Eclipse, it is working properly right now.

  • @TirthPrajapati-by9mu
    @TirthPrajapati-by9mu 5 місяців тому

    ❤❤❤