REST Web Services 16 - Building Service Stubs

  Рет қаралды 294,304

Java Brains

Java Brains

Күн бұрын

Пікірлер: 84
@dhruvsinghkushwah5919
@dhruvsinghkushwah5919 3 жыл бұрын
KOUSHIK YOU'RE DOING A GREAT JOB. PLEASE PLEASE PLEASE KEEP UP THE GOOD WORK. YOU CAN'T IMAGINE HOW BIG OF A SUPPORT YOU ARE TO ME AT THIS POINT IN MY LIFE. I DON'T KNOW HOW TO THANK YOU OTHER THAN JUST SUBSCRIBING, LIKING ALL YOUR VIDEOS AND SHARING THEM FROM TIME TO TIME...TYSM TYSM!
@AndersRapp
@AndersRapp 9 жыл бұрын
Great video. Only one problem I can see. When you create a message you give it an id which is the size of the map +1. If you then delete any message in the map and then create a new message the algorithm will give you the same id as before. This might work when you build your stub, before you run your methods. And then when you create a new message you aquire the id of the last message and add 1 to it. :)
@SheshagiriPai
@SheshagiriPai 9 жыл бұрын
+Anders Rapp I thought about the same as soon as he explained addMessage. Excellent video nevertheless.
@pvi-axe
@pvi-axe 6 ай бұрын
bit late to party, but I solved the issue by simply creating a static variable named autoID, and set it to increment at every object creation and assign it to the instance var of the current obj. Easy fix! Now no matter what operation you do, it'll never repeat the same ID.
@muthhu1234
@muthhu1234 9 жыл бұрын
Thank you very much Mr. Koushik. This tutorial is so helpful and your way of teaching is awesome!!. Waiting for the next one.
@absolute.explore
@absolute.explore 9 жыл бұрын
Thanks Koushik, you are doing excellent job! It helps a lot of people!
@2008chami
@2008chami 9 жыл бұрын
Great series, impatiently awaiting for the next one !
@RayFIghtZzMe
@RayFIghtZzMe 9 жыл бұрын
thank you, it is nice to follow your tutorials, waiting for the next one)
@enlightened3945
@enlightened3945 5 жыл бұрын
Humor at it's best.. :D I have done this because I am under the assumption that there is only one person .. one developer who is learning Jersey on your machine and they are connecting to this class.
@jaiadwani3305
@jaiadwani3305 9 жыл бұрын
Thank you Koushik. You got great Teaching skill.
@JoseRodriguez-km5gw
@JoseRodriguez-km5gw 9 жыл бұрын
Great!!!, thanks for teaching REST. I'll keep waiting next video.
@markcaruso8313
@markcaruso8313 7 жыл бұрын
Just really great. Wonderful teaching style. Thanks!
@kowong5316
@kowong5316 8 жыл бұрын
Thank you ! you are literally a hero :D I never knew I can learn so much
@shobhasingh659
@shobhasingh659 9 жыл бұрын
excellent tutorial........really awesome thanx a lot due to u im able to learn this.....
@taniaromero1557
@taniaromero1557 9 жыл бұрын
Can`t wait for the next tutorial :p
@paracha3
@paracha3 9 жыл бұрын
Awesome Java tutorials
@Tomy97xbox
@Tomy97xbox 7 жыл бұрын
This was quite enjoyable, never really used Maps before :P
@anshukas
@anshukas 9 жыл бұрын
hey, thanks for doing such effort. I like your video and it is very useful.
@chowdeswariappasani9715
@chowdeswariappasani9715 8 жыл бұрын
Just loved this video!
@_deepuprem629
@_deepuprem629 7 жыл бұрын
can someone tell me, what shortcut keys did he use to generate those methods at 6:25?
@srit3652
@srit3652 7 жыл бұрын
Think it was a cut and paste from his code
@larswang6759
@larswang6759 6 жыл бұрын
In spring boot Data REST, everything can be done using much less code. Why some companies still use Jersey? Thank you
@prasantaroutray6053
@prasantaroutray6053 9 жыл бұрын
Super sir..that very useful
@prathmeshsutar7989
@prathmeshsutar7989 6 жыл бұрын
Hi Thanks for video, My question is, Can we pass string as request instread of using jaxb
@prateshtamhankar3568
@prateshtamhankar3568 6 жыл бұрын
hi , considering this application can i use swagger instead of postman?
@SureshTiwaridone
@SureshTiwaridone 8 жыл бұрын
when i implemented the put method.......m able to make the changes to the messages but when i see the same message using get request the changes are gone and i only see the old message and not the updated one
@navinmp2373
@navinmp2373 9 жыл бұрын
Excellent tutorial
@515ishan
@515ishan 9 жыл бұрын
Hello Koushik, I am following the tutorial exactly but I am facing a weird problem. I am not able to display the id while getting all the mesages. i did a system out of the object that is being sent as a response and the id value (1 or 2 as per example is displayed on server console) but is not displayed in the xml output. Can you please explain why this is happening?
@corsaronero5619
@corsaronero5619 8 жыл бұрын
Hello Koushik, i'm struggling to add sqljdbc4.0.jar in order to connect to sql server, ir ead that there is no maven instruction in order to do that. how can i solve my issue?. btw you are super!!!! never seen something so difficult explained in an easy way as you did. congrats
@alexbennet9415
@alexbennet9415 6 жыл бұрын
why am I not able to run apache in debug mode ? I am getting source not foung exception
@martinas4ef
@martinas4ef 6 жыл бұрын
Hi! What if I want to connect with a MongoDB database with messages? How can I do that?
@大盗江南
@大盗江南 8 жыл бұрын
thank u so much..... helps me a loooooooooooooot!!!!!!thank u
@manojvijayvargia7998
@manojvijayvargia7998 9 жыл бұрын
Excellent !!! Could you please some on security as well.
@N1mro8
@N1mro8 8 жыл бұрын
How can I make sure that it reads from an mysql database?
@shubhamchandra9258
@shubhamchandra9258 6 жыл бұрын
In MessageService class using message id generator as size + 1 can cause logical errors. As size can keep on increasing or decreasing. Thus the newly generated ids won't be unique and may override existing messages.
@TM-lf6os
@TM-lf6os 6 жыл бұрын
What do you recommend using instead?
@gov914
@gov914 9 жыл бұрын
Excellent! Thank you.
@vineettalashi
@vineettalashi 7 жыл бұрын
One Query : While adding a new message, We are setting id as Int , while the data type of id is Long. I am facing compilation error at this point. Can anyone explain?
@ilhomhuja
@ilhomhuja 7 жыл бұрын
i found this article: javax.xml.bind as deprecated for removal, so that means that XML will not work further on or what??? how ever this lesson was last one, i stoped at this one, as my JK not finding the javax.xml.bind... package., so what to do ? thanks.
@hakamsingh4679
@hakamsingh4679 7 жыл бұрын
Use Java1.8 with Tomcat 8.5 it will work fine
@Lostforface
@Lostforface 5 жыл бұрын
Can some one tell me how does he transforms messages.values() to a returns statement at 6.02. what is a shortcut? :)
@smithdragon6477
@smithdragon6477 6 жыл бұрын
hey teacher am really confused about thread safe could make a course for us
@mgtowindia9549
@mgtowindia9549 5 жыл бұрын
I am getting confused with the complexity of the code. May be I am not at that level to understand this.
@akashkumarsahu1753
@akashkumarsahu1753 6 жыл бұрын
Nice Tutorial
@shivamsood4995
@shivamsood4995 4 жыл бұрын
m using jersey 3xx version with tomcat 9 and m getting classnotfound exception..if anybody knows about this just let me know
@bonduu01
@bonduu01 9 жыл бұрын
Excellent!!!
@jayadeepgs7462
@jayadeepgs7462 5 жыл бұрын
Thanks a lot sir😀
@hemonthm3993
@hemonthm3993 8 жыл бұрын
can somebody solve my problem.I did the same program that koshik did in this tutorial.I got an error message while executing a program stating: " HTTP Status 500 - Internal Server Error. "cause: " SEVERE: MessageBodyWriter not found for media type=application/xml, type=class java.util.ArrayList, genericType=interface java.util.List.I even used @XmlRootElement annotation.
@gutsydevgon12
@gutsydevgon12 8 жыл бұрын
hey Koushik, can you explain why does jaxb throws internal server error-500, if bean properties are public.
@hemonthchouddaryMandava
@hemonthchouddaryMandava 8 жыл бұрын
hi bhaskar did you fix the error. i am getting the same error. what do you mean by bean properties?? how can i fix this issue?? error message i got on console: Severe: MessageBodyWriter not found for media type=application/json, type=class java.util.HashMap$Values, genericType=java.util.Collection.
@rahuldevmishra4558
@rahuldevmishra4558 7 жыл бұрын
If somebody is facing the MessageBodyWriter not found error, then include the following dependency in pom.xml org.glassfish.jersey.media jersey-media-json-jackson
@avaXmovieS
@avaXmovieS 8 жыл бұрын
What ever I do i get "HTTP Status 404 - /messenger/messages" ... Any suggestions ?
@meriemkaroun7626
@meriemkaroun7626 8 жыл бұрын
Look at your web.xml ! Did you set the package in the right way?
@fafaselection
@fafaselection 8 жыл бұрын
rightclick on the project-> maven->update. it will be fine
@MultiJennis
@MultiJennis 8 жыл бұрын
try /messenger/webapi/messages
@shivankshityagi8764
@shivankshityagi8764 6 жыл бұрын
i keep getting the same error did you fix it?
@vivekkhandre
@vivekkhandre 9 жыл бұрын
Thank you for sharing.
@sergioenriquerojasmoncada8526
@sergioenriquerojasmoncada8526 7 жыл бұрын
great great video
@SoeaOu
@SoeaOu 9 жыл бұрын
it works, thanks i just wish we could use jsons instead of xmls ;)
@niral420
@niral420 9 жыл бұрын
Can anyone tell me how can I integrate Hibernate in this application? Do I need to add Jars? If yes, then where do I add those Jars? or is there a way to achieve this using maven?
@errrzarrr
@errrzarrr 8 жыл бұрын
+Niral Patel Yes. You MUST add Hibernate jars and Connector/J jar. You put them in /lib folder and add to build path.
@niral420
@niral420 8 жыл бұрын
+Roberto M. Thanks for this information. Actually, I didn't know anything about maven then. Now, I know that one has to add dependencies in pom.xml for any framework support.
@girishsudarshan1879
@girishsudarshan1879 5 жыл бұрын
Great classes by default. If anyone getting 500 server error at the time of list to xml conversion add below dependency com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider 2.9.0
@Patroncobermudas
@Patroncobermudas 7 жыл бұрын
if i change int instead of Long?
@TM-lf6os
@TM-lf6os 6 жыл бұрын
Would be fine for this example, but not for an API for something like facebook where there are trillions of messages, since int only goes up to 2,147,483,647. I believe that is why he used long instead of int.
@victorolali
@victorolali 3 жыл бұрын
These views are too few for such gold
@letterfake8319
@letterfake8319 5 жыл бұрын
Someone please explain Thread safe to me.
@ilhomhuja
@ilhomhuja 7 жыл бұрын
@XmlRootElement never worked ((
@vamshikrishna8143
@vamshikrishna8143 6 жыл бұрын
Same here and it is very disappointing. did you find a solution
@subratsrivastava
@subratsrivastava 6 жыл бұрын
Import the following then @XmlRootElement should work fine import javax.xml.bind.annotation.XmlRootElement;
@goranmarinkovic9143
@goranmarinkovic9143 6 жыл бұрын
Look at on comments in previous video
@FiruzzZ-777
@FiruzzZ-777 7 жыл бұрын
great videos so far, but it becomes boring when u start to explain basic java concepts like what a static methods or classes are, every attribute that class has and its constructor with every parameter, how an element is added to a collection
@akthakkar11
@akthakkar11 4 жыл бұрын
Who else is watching with 1.5 playback speed?
@SureshTiwaridone
@SureshTiwaridone 8 жыл бұрын
If anybody knows please hep me guys
@soulmate_officials
@soulmate_officials 7 жыл бұрын
sir i only get one return message insted of two ,so please suggest
REST Web Services 17 - Accessing Path params
13:28
Java Brains
Рет қаралды 248 М.
REST Web Services 22 - Pagination and Filtering
11:59
Java Brains
Рет қаралды 207 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
REST Web Services 05 - HTTP Methods
11:05
Java Brains
Рет қаралды 380 М.
REST Web Services 27 - Handling Exceptions
17:54
Java Brains
Рет қаралды 186 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 132 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
REST Web Services 24 - Using Context and BeanParam annotations
10:47
REST Web Services 25 - Implementing Subresources
16:20
Java Brains
Рет қаралды 150 М.
All Rust features explained
21:30
Let's Get Rusty
Рет қаралды 339 М.
REST Web Services 08 - HATEOAS
14:14
Java Brains
Рет қаралды 396 М.