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!🙏
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.
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
@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. 😊
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
@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..
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?
@@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
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.
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
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
@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 !
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)
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; }
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!🙏
Spring made programming easy ❌ TELUSKO made Spring easy ✅
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
Hi bro need help
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.
You don't teach, you educate! Thank you!
Bro's Teaching everything
that's soooooo gooood
goood to know how things work behind the scene so we can fix bugs pretty quickly
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
thanks! very useful!
Thats why i still use VS CODE
You're amazing Sir. King of Java
@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. 😊
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
I really appreciate your hard work in creating such simple yet valuable content in your videos.
Thanks please don't stop making videos. I need it for my finaly year project
its teaching....it's a style of teaching... helps a lot 😍
Thank you for this video! Everything worked on my machine as well!
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
This time your code works for me. I face strange issues sometime and most of the time reset of Intellij fix the problem.
spring made programming easy ❌ but he did... yes, Navin Reddy made programming easy 💥
Hi Navin!!!... the lombok works normally in my machine and it's typically you need to restart you system.
@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..
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?
@@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
You're very good at teaching. I can't wait for the next lesson!
Wow. amazing videos. Thank you for the videos Sir
You are Good...!!
Explanation is Amazing!
Thank you for making it easier to understand.
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.
Thank you for this video! Everything worked on my machine!
Thank you for the great video . please keep uploading more such kind of videos
THANKS FOR THIS AMAZING VIDEO!!! THANKS TELUSKO
Hi Sir, please upload videos on regular basis.
Really good lessons, keep updating please
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
These vids are amazing. More uploads please
Appreciate your every video! Thank you
Great explanation, upload more lectures
This is premium level content for free NGL
Your content is superb✌️
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
Thank you
Really lot of fun sir to learn spring boot
Appreciate the efforts!
In IntelliJ we have to enable runtime settings for lambok
these videos are really helpful
Love your videos!
@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 !
Great work sir
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)
you have to add lombok plugin to solve this issue
Looks like, You didn't enable Lombok IntelliJ plugin. You got popup to configure Lombok in intelliJ at 5.09 minute in video.
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?
Thank you for the video.
Top notch content!!
Great video
Nice Video Sir Thank You
Telusko ❤
Thank you sir for video ❤
make a default constructor in product for removing the error.
Lombok will work but use the annotations called @Setter and @Getter
need a separate video for Lombok please!
Thank you
Thank you SIR
thank you sir 🙂
Interestingly i was able to use lombok library
thank you!
I also had the issue with IntelliJ, 8080 still in use... that's annoying lol
Getting an empty list on my browser. Any suggestions to fix this?
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;
}
good job
Awesome video
Im getting this error "Consider defining a bean of type 'int' in your configuration."
CFBR ❤
Hi Sir, why are we using @Component annotation on Product class? We are not using it as a bean.
for modularity and encapsulation
How is that related here?
@Component is not necessary for Product class in this case, as we r manually creating object using new keyword inside Arrays.asList method
Lombok dependency problem sir
int range exceed
I am getting blank json. Please help
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;
// }
}
@@deepak_jain i am facing application failed to start
Same issue any solution to this
@@deepak_jainsame issue
@telusko
lombok library is always a problem for me as well
nice!
❤❤❤❤❤
💝
layers simplified
Please daily upload video sir... what happened to you 😢
sudo lsof -nP -iTCP -sTCP:LISTEN
Lewis Ruth Young Shirley Robinson Richard
wass here
ncccccceeeeeeeeeeeeee
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.
❤❤❤