Rest API | Web Service Tutorial

preview_player
Показать описание
Check out our courses:

Coupon: TELUSKO10 (10% Discount)

Coupon: TELUSKO20 (20% Discount)

Udemy Courses:

For More Queries WhatsApp or Call on : +919008963671

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

More Learning :

Donation:
PayPal Id : navinreddy20
Рекомендации по теме
Комментарии
Автор

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

sureshprajapati
Автор

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✨

manirajsivasubbu
Автор

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.🙏

raghavgupta
Автор

If given an option, I would like to give 15 likes for this amazing tutorial. Always grateful to you sir.

kalpanabejawada
Автор

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.
👏👏👏

a.s.h.o.k
Автор

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")
GET:
Sample to get all employees
Below shd be in method header
@GET

public List<Employee> getEmployee(){

return new ArrayList<Employee>();
}
Note: In Employee object class we shd mention @XmlRootElement so that it acts XML return type for the service.
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
@GET
@Path("employee/101")

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.
@GET
@Path("employee/{id}")

...
return obj.get(id);
}
POST:
@POST
@Path("employee")
public Employee createEmployee(Employee emp){//Insert new record
...
return emp;
}
PUT:
@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:
@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.

gowthamannarayanan
Автор

If you still get error 500:

XMLROOTELEMENT is not working. you can get it using JSON.
1. Enable json binding dependency from pom.xml (It is already written in pom.xml)
2. Change MediaType.APPLICATION_XML TO MediaType.APPLICATION_JSON
3.Go to your pojo class and use @JsonbAnnotation instead of @XMLROOTELEMENT
and you are good to go.

joro
Автор

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 😊

srividhyaful
Автор

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!

vinhleduy
Автор

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😍😍😘😘💕💕💖

krishnaforu
Автор

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!!

mylinhtran
Автор

REST webservices explaination, this is best video to learn REST API in Java in whole youtube . Good work .

javaguru
Автор

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.

ckudalkar
Автор

Thanks a lot for the video. I happened to found this on YouTube search and intially planned to watch it only for few minutes but later I couldn't stop myself from watching it completely.

shrao
Автор

Didn't even feel like a lecture or boring... you are the best teacher in youtube for technology

balachandarthangavel
Автор

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

ganlortrix
Автор

This is the best spring tutorial I have seen, and I am half way through. Thanks for the video.

leoking
Автор

Your videos deserve LikeX10 ! You make aliens life easy at Earth!

shrutijain
Автор

@XmlRootElement binding not working for me, no import for me showing, wat to do?

shonkoshy
Автор

It was Great Learning on this topic. I follow ur all leanings. Thanks a lot!!

alakendusar