For those who're getting nullPointerException and null values in database despite successful POST request, it can be sorted simply by replacing @Data annotation from model class with usual getters, setters.
Every line was point to point . One who knows basics of java can easily understand through this video. Thanks, very useful. I tried to post and get data but it's doesn't work. after debugging I realized that the Lombok doesn't provide a getter and setter for the class. when I added it manually (get, set) everything works well!
I am a big fan of videos uploaded by Ramesh fadatare, his approach in explanation with lots of patience, consistency in explanation, perseverance till he reaches the last bit of the API. Thank you sir! You are a blessing to the Java Development world.
highly resourceful and knowledgeable, it definitely comes in handy to start a new spring boot application with good project structure and hibernate JPA
been through countless udemy videos. Stopped learning spring boot as I felt it is way more complicated than nodejs backend dev, but this video is an absolute charm! Worked like magic. Second day and I am creating api's already!
bro I'm just starting out with Java Backend, will it be fine if I directly start with microservices and springboot. I've already strong knowledge of Java.
Thank you soo much it worked for me. I saw many videos but every time struck somewhere in the code with errors. I am soo happy now that it successfully executed.
Thanks, very useful. I tried to post and get data but it's doesn't work. after debugging I realized that the Lombok doesn't provide a getter and setter for the class. when I added it manually (get, set) everything works well!
Lombok does provide getters and setters. I was facing the same issue with intellij IDE. I had to enable 'Annotations preprocessing' and also install Lombok plugin in order to access the getters and setters during compile time. Hope this helps if you are using intellij
Even I faced the issue with Lombok. Then I added getter , setters to java code by right click->generate getters and setters, Also to be able to debug I modified the header in postman to content-type:application/json/ One of them helped to create and save records to database
Only One thing need to say. I Love your way of teaching :) Good 1.27 hours of learning from you. lastly you forgot to show the custom exception throw. I was waiting to see it.
When i had run the application and when i had inserted the values into database through post method in postman, I'm getting internal server error - 500. I can't get the values in database. Help me out
Thank you so much Sir... 🙏🙏 Learning a lot from your videos. ❤️❤️ Kindly help me with it - Like I write code, commit it to svn (or git), Now build with jenkins And the jenkins will deploy it to the local server. Is this possible to learn without using AWS etc at local setup ?
@Data annotation should work as a replacement for generating all the getters and setters. But for me the annotation is not working. I had to generate all the getters and setters manually. Otherwise whenever I am hitting the url with the json data no data is coming in to the controller.
Sir please answer me : Does this project have Entity, Repository, Services, and Controller layers an at least one file in each one. The logic is up to you, but you need the have basic CRUD end points in your controller ?
Such a nice video to learn and you have explained it very easy way too. But I faced one issue while following your steps and unable to fix it. In postman i am getting an unsupported media error. Even when i have selected JSON, even tried with content-type = application/json. I am using java 8 and the highest stable version of spring boot and mysql. if you can suggest me the fix, that will be very helpful. code I have copied from your git. so all are the same, except pom (versions)
Hi Ramesh, Great going tutorial.... I have one question as for hibernate whenever we initiate any operation we need to create Session factory / session objects.. But here as we are using hibernate with spring boot why session factory is not created. Is it managed by spring boot internally and if it's not then could you please guide here... Thanks in advance Thanks
Does anyone know why I got this error for the POST API? "not-null property references a null or transient value : com.example.springbootdemo.model.Employee.firstName" . I don't how to debug it
I have the same issue, with fadi Mashan explanation, I understood that Lombok didn't work. So I just did Source -> Generate Getter & Setter and it works.
The table is craeted but while hitting the rest endpoint "/api/employees" no data is getting inserted and response is "status": 500, "error": "Internal Server Error",
@@rohitbit8737 Really? Hmmm I dnt knw what the problem could be, especially without seeing the code. Look through his GitHub code to see if you've missed anything. Best of luck! Sorry couldn't be more help.
Hi sir, Thank you for making this video but I have query that how can I enter values in between like if I delete Id=2 then how can enter a value of 2 again later.
sir, a basic question....why did you make an implementation class of service interface? Like we can make a service class and create API methods ...I want to know the reason.Kindly reply .
In spring-based applications, we use dependency injection right, and to maintain the dependencies loosely coupled we typically use interfaces. It's always a good practice to use interfaces so that we can replace the implementations easily.
install lombok on your eclipse if you guys have some problem JSON post null or CONSOLE ERROR not-null property. go to help - install new software - write porjectlombok url - install
org.hibernate.PropertyValueException: not-null property references a null or transient value : com.jpa.test.springboot.model.Employee.fName im facing this error
I don't know what's wrong I tried many thing but didn't able to get rid of 500 Internal server error,followed complete video and typed accordingly even checked github properly but not getting what could be the issue but this video was literally complicated for me anyways best of luck
sir i have doubt if we have more than one entity classes like Employee,address,experience,contactdetials how we need to develope Rest Api sir. we need to create repository for every entity classes ah sir. and also i have one more doubt we need to create service and controller classes for every entitiy classes ah sir.
Hi, i am getting the following error when i try to post the json to the save restAPi. please help org.hibernate.PropertyValueException: not-null property references a null or transient value : com.example.SpringAPI.SpringAPI.model.Employee.firstName