The way you teaching is awesome sir... I learnt python & Servlet & JSP from you and I have started REST API. you are explain everything very clearly. You are a great teacher ever I seen. Thank you so much sir✨
Sir ,your trial and error method is really good. I have seen many other videos where educator simply says the correct method to use and I never understood why only this method or this way it should be done . But when you say let's see whether it will work or not and this is the error for that this is the solution it help me alot in better understanding .thank you .
Intelligent People, then Extra Intelligent People, and then comes People with copious amount of Knowledge like "Navin Sir". I am ecstatically grateful to you sir.🙏
1. What is REST API? | Web Service - 00:05 2. Restful Web Services | Introduction - 11:12 3. Creating a Jersey Project in Eclipse - 15:29 4. Running our First Rest Jersey Application - 23:59 5. How to create a Resource Class - 32:30 6. List as Resource - 43:02 7. Mock Repository - 46:29 8. Creating a Resource - 56:27 9. How to install Postman - 01:02:25 10. Send a Post Request - 01:07:04 11. PathParam - 01:11:41 12. Working with JSON - 01:19:35 13. Mysql Repository part 1 - 01:24:56 14. Mysql Repository part 2 - 01:33:35 15. Consumes JSON and XML - 01:42:06 16. Update Resource using PUT method - 01:47:45 17. Delete Resource - 01:58:04 18. RESTful Web Services | Recap - 02:03:46 19. Spring Rest | Spring Boot Example - 02:11:19 20. Spring JPA | REST - 02:23:38
First of all very good tutorial. Highly appreciated Naveen. Have taken notes till point 17 which may be helpful to recall. Correct me if anything wrong @TELUSKO REST Rest can accept and produce global formats such as json,xml. It is nothing but respresentation of state of the object. We can cache the service if we are consuming it frequently. There are 4 types of request which will use usually that we can map into CRUD operations GET-->To retrieve the values. Note: If you dont mention any @Path in method level then when u frame and hit URL with resource alone then it will be called. POST-->Used to create\insert operations PUT-->Update Delete-->Remove There are several ways of implementation of REST as it is a concept. Here we have considered JERSEY. Creating Maven project which will import and create jersey dependencies in eclipse EE ide. Creating Resource. Will have to create class. Above class will have to mention @Path("employees") URL Eg: HTTP://host:port/applname/webapi/employees GET: Sample to get all employees Below shd be in method header @GET @Produces(MediaType.APPLICATION_XML) public List getEmployee(){ ........ return new ArrayList(); } Note: In Employee object class we shd mention @XmlRootElement so that it acts XML return type for the service. URL Eg: HTTP://host:port/applname/webapi/employees If we enter above URL and press enter from browser, will get output in xml format. To produce in json format then will have mention MediaType.APPLICATION_JSON and you can add many types by separated with commas But for JSOn support will have to add jersey-media moxy tag in pom.xml. If we want to pass URL param so that will get particular\single object URL Eg: HTTP://host:port/applname/webapi/employee/101 @GET @Path("employee/101") @Produces(MediaType.APPLICATION_JSON) public Employee getEmployee(){// we cannot pass 101 value to the method. Simply we can say it is hardcoded. ... } So, will have to rewrite the method logic. URL access will be same. HTTP://host:port/applname/webapi/employee/101 HTTP://host:port/applname/webapi/employee/102 @GET @Path("employee/{id}") @Produces(MediaType.APPLICATION_JSON) public Employee getEmployee(@PathParam("id") int id){// Id act as a place holder ... return obj.get(id); } POST: URL Ref: HTTP://host:port/applname/webapi/employees/employee/ pass values with body as no path param mentioned @POST @Path("employee") public Employee createEmployee(Employee emp){//Insert new record ... return emp; } PUT: URL Ref: HTTP://host:port/applname/webapi/employees/employee/101 pass values with param, so that it will be updated. @POST @Path("employee/{id}") public Employee updateEmployee(Employee emp){//Update ... return emp; } Notes: GET(Single record),DELETE and PUT looks same w.r.t URL. But can be differentiated using the type of request when client submits it. DELETE: URL Ref: HTTP://host:port/applname/webapi/employees/employee/101 pass values with param, so that it will be Deleted. @POST @Path("employee/{id}") public Employee deleteEmployee(Employee emp){//Delete ... return emp; } Notes: GET(Single record),DELETE and PUT looks same w.r.t URL. But can be differentiated using the type of request when client submits it. As per REST and coding standards will have to map the CRUD operations with correct HTTP request. However if you dont map also, according to the internal implementation it will work but still it is not recomended.
I ❤️ ur way of explanation sir. For example, first you'll tell/show the error parts🙅♂️ and again expressing that you can't do like this, it make a sense✅. It makes us grasp things in an efficient way. 👏👏👏
I was scouring online for a very resourceful tutorial on Rest. I thank my good time that let me land this gem of a coaching on webservices. The way the trainer expresses and articulates concepts is truly appreciable. Anyone can get the hang of an API by being his student! Thanks 😊
I have non engineering background, just let you know that, your tutorial was amazing, I watched many REST API lectures, this was the best for me, thank you!
Thanks a lot for the video. I happened to found this on RUclips search and intially planned to watch it only for few minutes but later I couldn't stop myself from watching it completely.
This is the first time i understood why it is called as REST . No books told it so clearly as you. They just blindly write...Representational State Transfer. Now I understand from your lecture that it is a representation of the state of the object in either Json or XML. Thanks to you. God bless you.
I haven't finished the video yet because it's quite a long one, but I like what you have shown so far. I will finish this tutorial soon. Just want to put a comment here before it slips my mind. Great explaination and thanks for the tutorial!!
Thank you for the excellent tutorial on REST API technology. I was searching for a tutorial to understand the same. I learned a lot from your presentation and I appreciate your clear and engaging style of teaching. You made the topic easy to understand and fun to practice. I especially liked how you demonstrated the use of different HTTP methods and how they affect the resources. Thanks for your energy and efforts that you put in these videos every time. I would highly recommend your tutorial to anyone who wants to learn more about REST APIs
Java Rest API is very well explained .Thank you. One thing I want to add , when we start with eclipse maven project ,artifacts will not be loaded most of the times that error can be solved by creating a dynamic web project and then converting it to maven project.
hi Navin, Thank you so much for hsaing knowledge; your session are always great. I am working on one API related project and need few trainees who are good in API so incase you like to refer few of your trainee who you feel are good then its will be great help
I didn't even do a single line of code to practice this :D but you taught it so well that I feel that I can make organization level application :D As always thanks for great content
Your explanation extremely stupendous. Can you please start sessions on rest assured (API Automation), many people like me will update the skills in software testing.
If you are getting "java.lang.ClassNotFoundException: jakarta.servlet.Filter" at 27:15 then change the version number of jersey in pom.xml "2.26-b03" and change the imports in MyResources.java
Thank you for providing us with such a meaningful and helpful resource in the most easily accessible way. We are truly indebted to you for your efforts to educate people with this gem of a tutorial. Also, thank you for making a successful attempt at giving relevant and easily understandable examples of concepts that we otherwise would have taken ages to learn. Keep up the good work sir.
getting this error when clicking my resource...please help.... The origin server did not find a current representation for the target resource or is not willing to disclose that one exists
Hello your tutorials are awesome!! You explain so well and your examples are very clear, so easy to understand. Thank you so much. But can you please speak a little bit slower for non English native speakers. Thanks again
i am not able to create that resource file that had shown at the time stamp 32:30 what to do it is not showing any output just 500 error even follow for every single step.
You are simple the awesome...😍 Its a really helpfull having all topics in single video.. 😍And your explanation makes understanding concepts very easy... 👌💻
2:33:18 After, doing all the steps correctly, I'm still facing an error which is " Cannot load driver class: com.mysql.jdbc.Driver ", before fetching up this from mysql database, the defaults values (at 2:22:37) were run fine for me. How to solve this driver problem, anyone??
God of Spring Boot @Navin Reddy, Excellent work Sir, Thanks for making videos and helping people with the valuable stuff, appreciate your hard work for us
hey, I have tried hands-on but I'm getting an error "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists." I have tried to fix it by changing my server location as well but my still resource cant be found. please help me.
Add a dependency for jaxb-runtime (version 2.3.3 worked for me). It's a lib for automatic XML mapping and binding them with Java objects. Seriously, Telusko should have mentioned it, the solution took me a couple of hours to find... Peace.
I was daily watch your video and performers base on your video now today I have a job as a android developer .thank you very much naveen sir
bro which company hired u? Do they have an interview
@@scanadith lol :D
what ever he got a job.
@sake kirikue r/wooosh , understand sarcasm bro
@@scanadith kindly , stop using reddit terms on the youtube to act smart which you are not.
The way you teaching is awesome sir... I learnt python & Servlet & JSP from you and I have started REST API. you are explain everything very clearly. You are a great teacher ever I seen. Thank you so much sir✨
Sir ,your trial and error method is really good. I have seen many other videos where educator simply says the correct method to use and I never understood why only this method or this way it should be done . But when you say let's see whether it will work or not and this is the error for that this is the solution it help me alot in better understanding .thank you .
Thats what make him unique!
Can u tell me if i need to learn Jersey or not
If given an option, I would like to give 15 likes for this amazing tutorial. Always grateful to you sir.
You can alway create 25 accounts and do so mate 😸
Intelligent People,
then
Extra Intelligent People,
and then comes
People with copious amount of Knowledge like "Navin Sir".
I am ecstatically grateful to you sir.🙏
1. What is REST API? | Web Service - 00:05
2. Restful Web Services | Introduction - 11:12
3. Creating a Jersey Project in Eclipse - 15:29
4. Running our First Rest Jersey Application - 23:59
5. How to create a Resource Class - 32:30
6. List as Resource - 43:02
7. Mock Repository - 46:29
8. Creating a Resource - 56:27
9. How to install Postman - 01:02:25
10. Send a Post Request - 01:07:04
11. PathParam - 01:11:41
12. Working with JSON - 01:19:35
13. Mysql Repository part 1 - 01:24:56
14. Mysql Repository part 2 - 01:33:35
15. Consumes JSON and XML - 01:42:06
16. Update Resource using PUT method - 01:47:45
17. Delete Resource - 01:58:04
18. RESTful Web Services | Recap - 02:03:46
19. Spring Rest | Spring Boot Example - 02:11:19
20. Spring JPA | REST - 02:23:38
Much appreciated
First of all very good tutorial. Highly appreciated Naveen. Have taken notes till point 17 which may be helpful to recall. Correct me if anything wrong @TELUSKO
REST
Rest can accept and produce global formats such as json,xml.
It is nothing but respresentation of state of the object.
We can cache the service if we are consuming it frequently.
There are 4 types of request which will use usually that we can map into CRUD operations
GET-->To retrieve the values.
Note: If you dont mention any @Path in method level then when u frame and hit URL with resource alone then it will be called.
POST-->Used to create\insert operations
PUT-->Update
Delete-->Remove
There are several ways of implementation of REST as it is a concept. Here we have considered JERSEY.
Creating Maven project which will import and create jersey dependencies in eclipse EE ide.
Creating Resource.
Will have to create class.
Above class will have to mention @Path("employees")
URL Eg: HTTP://host:port/applname/webapi/employees
GET:
Sample to get all employees
Below shd be in method header
@GET
@Produces(MediaType.APPLICATION_XML)
public List getEmployee(){
........
return new ArrayList();
}
Note: In Employee object class we shd mention @XmlRootElement so that it acts XML return type for the service.
URL Eg: HTTP://host:port/applname/webapi/employees
If we enter above URL and press enter from browser, will get output in xml format.
To produce in json format then will have mention MediaType.APPLICATION_JSON and you can add many types by separated with commas
But for JSOn support will have to add jersey-media moxy tag in pom.xml.
If we want to pass URL param so that will get particular\single object
URL Eg: HTTP://host:port/applname/webapi/employee/101
@GET
@Path("employee/101")
@Produces(MediaType.APPLICATION_JSON)
public Employee getEmployee(){// we cannot pass 101 value to the method. Simply we can say it is hardcoded.
...
}
So, will have to rewrite the method logic. URL access will be same.
HTTP://host:port/applname/webapi/employee/101
HTTP://host:port/applname/webapi/employee/102
@GET
@Path("employee/{id}")
@Produces(MediaType.APPLICATION_JSON)
public Employee getEmployee(@PathParam("id") int id){// Id act as a place holder
...
return obj.get(id);
}
POST:
URL Ref: HTTP://host:port/applname/webapi/employees/employee/ pass values with body as no path param mentioned
@POST
@Path("employee")
public Employee createEmployee(Employee emp){//Insert new record
...
return emp;
}
PUT:
URL Ref: HTTP://host:port/applname/webapi/employees/employee/101 pass values with param, so that it will be updated.
@POST
@Path("employee/{id}")
public Employee updateEmployee(Employee emp){//Update
...
return emp;
}
Notes: GET(Single record),DELETE and PUT looks same w.r.t URL. But can be differentiated using the type of request when client submits it.
DELETE:
URL Ref: HTTP://host:port/applname/webapi/employees/employee/101 pass values with param, so that it will be Deleted.
@POST
@Path("employee/{id}")
public Employee deleteEmployee(Employee emp){//Delete
...
return emp;
}
Notes: GET(Single record),DELETE and PUT looks same w.r.t URL. But can be differentiated using the type of request when client submits it.
As per REST and coding standards will have to map the CRUD operations with correct HTTP request.
However if you dont map also, according to the internal implementation it will work but still it is not recomended.
Good notes.
Thanks for this summary
Probably the best tutorial on RUclips on Rest Api in Java EE
I ❤️ ur way of explanation sir. For example, first you'll tell/show the error parts🙅♂️ and again expressing that you can't do like this, it make a sense✅. It makes us grasp things in an efficient way.
👏👏👏
I was scouring online for a very resourceful tutorial on Rest. I thank my good time that let me land this gem of a coaching on webservices. The way the trainer expresses and articulates concepts is truly appreciable. Anyone can get the hang of an API by being his student!
Thanks 😊
I have non engineering background, just let you know that, your tutorial was amazing, I watched many REST API lectures, this was the best for me, thank you!
Thanks a lot for the video. I happened to found this on RUclips search and intially planned to watch it only for few minutes but later I couldn't stop myself from watching it completely.
This is the first time i understood why it is called as REST . No books told it so clearly as you. They just blindly write...Representational State Transfer. Now I understand from your lecture that it is a representation of the state of the object in either Json or XML. Thanks to you. God bless you.
Didn't even feel like a lecture or boring... you are the best teacher in youtube for technology
REST webservices explaination , this is best video to learn REST API in Java in whole youtube . Good work .
I haven't finished the video yet because it's quite a long one, but I like what you have shown so far. I will finish this tutorial soon. Just want to put a comment here before it slips my mind. Great explaination and thanks for the tutorial!!
This is the best spring tutorial I have seen, and I am half way through. Thanks for the video.
Your videos deserve LikeX10 ! You make aliens life easy at Earth!
No comparison for u Naveen Sir...Fan of ur teaching style
Thank you so much for the amazing teachings sir..Felt very happy , when I searched for Rest Jersey and found ur video in the search list😍😍😘😘💕💕💖
Thank you for the excellent tutorial on REST API technology. I was searching for a tutorial to understand the same. I learned a lot from your presentation and I appreciate your clear and engaging style of teaching. You made the topic easy to understand and fun to practice. I especially liked how you demonstrated the use of different HTTP methods and how they affect the resources. Thanks for your energy and efforts that you put in these videos every time. I would highly recommend your tutorial to anyone who wants to learn more about REST APIs
This is seriously good idea to include all your previous videos in a single video... appreciate your work.
It was Great Learning on this topic. I follow ur all leanings. Thanks a lot!!
Thank you for this video, i have never seen any tutorial with such a clear explanation.
Crystal clear explanation .. kuddos to you Navin ...
41:15 I'm not able to add this annotation, the package is not importing. Any solutions for this error to solve
So grateful to u for these vdos. I bacame confident on java related stuff after watching ur vdos..Thanks a ton👍🏻👍🏻
Tutorials are amazing. I just wanted to get a quick revision and was really effective.
Java Rest API is very well explained .Thank you. One thing I want to add , when we start with eclipse maven project ,artifacts will not be loaded most of the times that error can be solved by creating a dynamic web project and then converting it to maven project.
Rest is not responsing in xml format .
And also not showing error in cosole
can u tell me why
@@PiyushSingh-em5vz did u resolved it I am also facing same error
@@anoopkulkarni9991 This error is due to old version try to use new version use Tomcat 10 also use everything updated version
You are very amazing sir, i always love your programming lesson. I wish you for the best and thank you.
Trust me, you are the best..I always come back to you after several visits
hi Navin, Thank you so much for hsaing knowledge; your session are always great. I am working on one API related project and need few trainees who are good in API so incase you like to refer few of your trainee who you feel are good then its will be great help
trainees, but also good in API???
Who said it's not good, yes it's not good .. it's awesome 😎
I was searching for your old video and BOMB you have integrated all in one thats really great !!!
Sir! your teaching very good. Anyone can easily understand!
It is really awesome and every single second is informative...
Thanks a lot.
thank you for making 2-3 hour videos sir its very usefulll no distractions
Sir,u provide proper explaination for everything,the way you explain also keeps me interview ready..thankyou
sir this was one of an awsome tutorial i have seen till now ...thankyou sir very much ....
I really appreciate the hard work you did! Great Job! And Thanks for making us understand very clearly.
Good work keep it up. You are changing many people's life for good..
I didn't even do a single line of code to practice this :D but you taught it so well that I feel that I can make organization level application :D As always thanks for great content
You are such a great teacher who make us understand the concept without any complexity. Thank for this worth video
You are a wonderful teacher. Thank you!!
beautiful teaching
i really love your teachings
Incredible video, you teach everything we need to know and a little bit more! Keep on the good work!
Your tutorial are getting smarter day by day, like you!! Thank you for your hard work and nice useful video.
Thanks telusko implemented rest using jersey with my sql 8 version having beginner in java as coming from .net experience
I'm using jersey v2.29
I'm getting 500 error when return java object as XML... but no any error on console.. But i can get string if return string
Really helpful...plz make 3 hrs video..its lyk revision/learning of whole subject in less tym..😊
Thank you very much! Your videos are more than helpful!
It's really an amazing video !! Navin Reddy sir you are superb!! Keep going
Thanks for the tutorial. Its really great that u explain every piece of code!
In entire video this "public interface AlienRespository extends CrudRepository" is awesome. Thank you sir....
I am getting error here. It says Action: "Consider defining a bean of type 'com.telusko.AlianRepositor' in your configuration."
Error 12760
Thanks alot Naveen sir for all ths series u r launching 🙏🙏
Needless to say, amazing content!
Then you r u saying if it's needless.
Your explanation extremely stupendous. Can you please start sessions on rest assured (API Automation), many people like me will update the skills in software testing.
Great content i love this... Well done!!!! Kudos
Kick ass explanation of REST thank you. 🖖🏼
best self-learning video I have ever watched. Thanks a lot.
1000 likes for your hardwork 👍👍👍👍👍
Thank you Naveen. You explained concepts very clearly and your videos are always helpful .
If you are getting "java.lang.ClassNotFoundException: jakarta.servlet.Filter" at 27:15 then change the version number of jersey in pom.xml "2.26-b03" and change the imports in MyResources.java
Incredible video, keep up the great work. Thanks for sharing.
best video on youtube today i found ..this is damm good . #MILLION DOLLARS VIDEO #THANK YOU SIR.
Thank you for providing us with such a meaningful and helpful resource in the most easily accessible way. We are truly indebted to you for your efforts to educate people with this gem of a tutorial. Also, thank you for making a successful attempt at giving relevant and easily understandable examples of concepts that we otherwise would have taken ages to learn. Keep up the good work sir.
Sir XML is not working on my system..are there any specific changes that need to be made in the code shown in the video?
Fantastic tutorial. Love your work! Keep Going!
Great work Reddy bhai....
Thank you so much. your teaching is very clear and simple and covers everything. thanks a lot.
❤ You made this complex topic so easy. Thank you!!
You make everything so simple
Great video.. I am new to REST and this video made many things just simpler.. thanks
@XmlRootElement binding not working for me,no import for me showing ,wat to do?
Same doubt.
Have you got any solution?
Hey, Did you find the solution for this annotation problem
@@sagarchaddha1538 Hey, Did you find the solution for this annotation problem
I moved on with node js😂😂😂
@@sagarchaddha1538 okay 😂 can you please suggest me the video or links on rest api with node.js !?
Thanks!
Thank you for the tutorial sir
Looks like sensei likes simple thanks over complicated praising
Thanks Navin, I learned a lot from this video.
getting this error when clicking my resource...please help....
The origin server did not find a current representation for the target resource or is not willing to disclose that one exists
hey I'm getting same error
did u find any solution?
@Navin sir-you are an excellent teacher. 🙏 Thank you. Session was very worthy. Gained good knowledge on Rest API.
18:15 i got the eclipse 2020 version dont know if its ee or not but it was the latest version.
i dont have ee version and the server tab is not there!! somebotty healp
Sir please maka lesson about Hibernate framework 🙏🙏🙏
Love and respect from Sri lanka 🇱🇰
Hello your tutorials are awesome!! You explain so well and your examples are very clear, so easy to understand. Thank you so much. But can you please speak a little bit slower for non English native speakers. Thanks again
youtube pe setting mai jake speed slow kr skte ...apne hisab se
i am not able to create that resource file that had shown at the time stamp 32:30 what to do it is not showing any output just 500 error even follow for every single step.
You are simple the awesome...😍 Its a really helpfull having all topics in single video.. 😍And your explanation makes understanding concepts very easy... 👌💻
2:33:18 After, doing all the steps correctly, I'm still facing an error which is " Cannot load driver class: com.mysql.jdbc.Driver ", before fetching up this from mysql database, the defaults values (at 2:22:37) were run fine for me. How to solve this driver problem, anyone??
Hi Navin,u do awesome work..plz do video on OKAPI ...Will be much useful like other courses
Very excellent 👍 keep it up.
Wonderful tutorial with clear and practical explanation
Glad it was helpful!
SEVERE: MessageBodyWriter not found for media type=application/xml, type=class
performed same step but still getting this error for 40:42
thank you very much , it help me a lot about my work of graduation
God of Spring Boot @Navin Reddy, Excellent work Sir, Thanks for making videos and helping people with the valuable stuff, appreciate your hard work for us
Any one please help me.1:08:54 if i want to use Json,what annotation should I use instead of @XmlElement
hey, I have tried hands-on but I'm getting an error
"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."
I have tried to fix it by changing my server location as well but my still resource cant be found.
please help me.
I also facing same problem,
I don't understand why this is happening
In 41:32 I found MessageBodyWriter not found for media type=application/XML, ..... error, please help me to fix sir
At 26:41 it's showing error for import statements and @ annotations
Can any one sought it out
And tomcat server also not working 😕
Thank u sir.i love your lecture and it is very useful for me.
awesome work bro , please keep up your good work...
You're an awesome instructor.
REST is not responding in xml why ?
Also not showing error in console
I'm still getting an internal server error after adding the @XmlRootElement (I tried running it on Tomcat 8.5 and 9.0.3)
same here
Hi, I am getting the same error. Were you able to find a solution to that?
me too. Any solution ?
Getting same error. Please help
Add a dependency for jaxb-runtime (version 2.3.3 worked for me). It's a lib for automatic XML mapping and binding them with Java objects. Seriously, Telusko should have mentioned it, the solution took me a couple of hours to find... Peace.
Very clear and understandable one ✨