Rest API | Web Service Tutorial
Vložit
- čas přidán 11. 07. 2024
- Check out our courses:
Spring and Microservices Weekend Live Batch : bit.ly/spring-live-weekend
Coupon: TELUSKO10 (10% Discount)
Master Java Spring Development : bit.ly/java-spring-cloud
Udemy Courses:
Java:- bit.ly/JavaUdemyTelusko
Spring:- bit.ly/SpringUdemyTelusko
Java For Programmers:- bit.ly/javaProgrammers
For More Queries WhatsApp or Call on : +919008963671
website : courses.telusko.com/
Instagram : / navinreddyofficial
Linkedin : / navinreddy20
TELUSKO Android App : bit.ly/TeluskoApp
RESTFUL Web Service in Java using Jersey and Spring
Intro - 00:00
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
#rest #api #webservice
Spring Full Course : courses.telusko.com/learn/Spr...
Java:- bit.ly/JavaUdemyTelusko
Spring:- bit.ly/SpringUdemyTelusko
More Learning :
Java :- bit.ly/3x6rr0N
Python :- bit.ly/3GRc7JX
Django :- bit.ly/3MmoJK6
JavaScript :- bit.ly/3tiAlHo
Node JS :- bit.ly/3GT4liq
Rest Api :-bit.ly/3MjhZwt
Servlet :- bit.ly/3Q7eA7k
Spring Framework :- bit.ly/3xi7buh
Design Patterns in Java :- bit.ly/3MocXiq
Docker :- bit.ly/3xjWzLA
Blockchain Tutorial :- bit.ly/3NSbOkc
Corda Tutorial:- bit.ly/3thbUKa
Hyperledger Fabric :- bit.ly/38RZCRB
NoSQL Tutorial :- bit.ly/3aJpRuc
Mysql Tutorial :- bit.ly/3thpr4L
Data Structures using Java :- bit.ly/3MuJa7S
Git Tutorial :- bit.ly/3NXyCPu
Donation:
PayPal Id : navinreddy20
www.telusko.com - Věda a technologie
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✨
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.
This is the best spring tutorial I have seen, and I am half way through. Thanks for the video.
Thanks a lot for the video. I happened to found this on CZcams search and intially planned to watch it only for few minutes but later I couldn't stop myself from watching it completely.
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.🙏
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 😊
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 😸
I was searching for your old video and BOMB you have integrated all in one thats really great !!!
Incredible video, you teach everything we need to know and a little bit more! Keep on the good work!
I really appreciate the hard work you did! Great Job! And Thanks for making us understand very clearly.
You are such a great teacher who make us understand the concept without any complexity. Thank for this worth video
It is really awesome and every single second is informative...
Thanks a lot.
Probably the best tutorial on CZcams on Rest Api in Java EE
It was Great Learning on this topic. I follow ur all leanings. Thanks a lot!!
Didn't even feel like a lecture or boring... you are the best teacher in youtube for technology
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.
Thank you for this video, i have never seen any tutorial with such a clear explanation.
Incredible video, keep up the great work. Thanks for sharing.
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.
👏👏👏
Sir,u provide proper explaination for everything,the way you explain also keeps me interview ready..thankyou
Fantastic tutorial. Love your work! Keep Going!
You are very amazing sir, i always love your programming lesson. I wish you for the best and thank you.
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!
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
Tutorials are amazing. I just wanted to get a quick revision and was really effective.
Your tutorial are getting smarter day by day, like you!! Thank you for your hard work and nice useful video.
Thanks alot Naveen sir for all ths series u r launching 🙏🙏
Thanks for the tutorial. Its really great that u explain every piece of code!
thank you for making 2-3 hour videos sir its very usefulll no distractions
You are simple the awesome...😍 Its a really helpfull having all topics in single video.. 😍And your explanation makes understanding concepts very easy... 👌💻
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
REST webservices explaination , this is best video to learn REST API in Java in whole youtube . Good work .
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
Thank you so much. your teaching is very clear and simple and covers everything. thanks a lot.
Thanks Navin, I learned a lot from this video.
So grateful to u for these vdos. I bacame confident on java related stuff after watching ur vdos..Thanks a ton👍🏻👍🏻
Thank you very much! Your videos are more than helpful!
sir this was one of an awsome tutorial i have seen till now ...thankyou sir very much ....
This is seriously good idea to include all your previous videos in a single video... appreciate your work.
It's really an amazing video !! Navin Reddy sir you are superb!! Keep going
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!!
Your videos deserve LikeX10 ! You make aliens life easy at Earth!
You make everything so simple
You are a wonderful teacher. Thank you!!
Navin,
Thank you so much for the video.
Thank you Naveen. You explained concepts very clearly and your videos are always helpful .
best self-learning video I have ever watched. Thanks a lot.
best video on youtube today i found ..this is damm good . #MILLION DOLLARS VIDEO #THANK YOU SIR.
Kick ass explanation of REST thank you. 🖖🏼
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
Great video tutorial!!! Thanks so much!
Thank you for the tutorial sir
Looks like sensei likes simple thanks over complicated praising
thanks so much Sir! I have learnt a lot from your videos.
Thank you sir ! You are an awesome teacher !
nice nice ......great video ....best API explanation ...very helpful.........big thanks
Crystal clear explanation .. kuddos to you Navin ...
Excellent video.. thank u so much Navin...
beautiful teaching
i really love your teachings
Very well Explained Thank you so much sir.
awesome video, can't thank you enough .
Sir! your teaching very good. Anyone can easily understand!
Good work keep it up. You are changing many people's life for good..
Thank u sir.i love your lecture and it is very useful for me.
Really helpful...plz make 3 hrs video..its lyk revision/learning of whole subject in less tym..😊
Sir you helped me a lot to learn java
Thanks telusko implemented rest using jersey with my sql 8 version having beginner in java as coming from .net experience
thanks a million times ...
Thank you so much sir.. Really helpful..
Great content i love this... Well done!!!! Kudos
Thank you sir for this tutorial
Thank you so much for explaining this with such simplicity. It was to the point and clear as crystal.
One more request, can we please have more on elasticsearch and its use on rest API ?
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?
@Navin sir-you are an excellent teacher. 🙏 Thank you. Session was very worthy. Gained good knowledge on Rest API.
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.
very useful.. thank you very much sir..
Thank you for the amazing lecture sir
very good video. Thanks a lot!!!
No comparison for u Naveen Sir...Fan of ur teaching style
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???
awesome work bro , please keep up your good work...
Needless to say, amazing content!
Then you r u saying if it's needless.
God bless you sir for your help
Great job sir!!
I'm really thank full to u
Very clear and understandable one ✨
Thanks for the video.
Thank u so much Navin sir.
thank you very much , it help me a lot about my work of graduation
I love this chanel.
you are great , you teach great , i love you , really thank youuuuuuuuuuuuuuuuuuuuuuuu
thank you very much sir for this video
Your all vedio's super sir i want React js vedio sir as early as possible to build up. Any thanks for sharing knowledge
that is tricky . thanks for successfully video
You are the bestest teacher
Great work Reddy bhai....
Thanks!
Perfect explanation
Great teaching sir plzzz make a full video on devops ..wtng for u r rply sirr
Hi, im new to web service and kinda lost.
I'm working on a codename one mobile project and have to make it communicate with a wildfly java server.
Can i use this tutorial as an example ?
Thanks