Тёмный

How to integrate JQuery Ajax POST/GET & Spring MVC | Spring Boot | Java Techie 

Java Techie
Подписаться 183 тыс.
Просмотров 55 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 76   
@PRASHANTKUMAR-wd9ww
@PRASHANTKUMAR-wd9ww 6 лет назад
Very Very Nice Video Basant...........really you are doing great job.And 1 more thing your explanation is very clear
@AlokKumar-nd1tf
@AlokKumar-nd1tf 5 лет назад
Brother, I am big fan of Ur knowledge.. thanks for sharing ur knowledge with us. Keep it up..
@chintu_singh91
@chintu_singh91 5 лет назад
Don't know how did I miss to watch this one. Really great Basant Bhai, u r a #Gem
@prasanjeetchakravarty6696
@prasanjeetchakravarty6696 2 года назад
Thank you for this video. its very helpful
@luchonoprograma203
@luchonoprograma203 Год назад
THANKS, THANKS VERY MUCH
@MilsonPazienza
@MilsonPazienza 2 года назад
I need it to my project I'll back here next week
@UTUBDZ
@UTUBDZ 4 года назад
Thank you for sharing such valuable content ! Can you give a hint on how to refresh data after adding/deleting to/from a table with Ajax ?
@Javatechie
@Javatechie 4 года назад
You need to do callback again to load all object , one more additional rest call to refresh
@maheshmuthangi613
@maheshmuthangi613 3 года назад
Thank you ❤️ java techie, if I get delete and update operations video or code that will be much better..
@ShinAkuma
@ShinAkuma 4 года назад
I'm having trouble with getRequest. When I click the button, the ajax is able to fetch the data from the controller, It displays "success" in the console along with the list of Book objects. But my DIV and UL inside it is not populated. What do I do ?
@Javatechie
@Javatechie 4 года назад
Did you added thymeleaf tag in your HTML head
@zzhyperr
@zzhyperr 3 года назад
gracias , thanks Techie !!
@murilodemeloreis8210
@murilodemeloreis8210 4 года назад
Thank you Java Techie. Well done and very helpful!
@Mohamed-uf5jh
@Mohamed-uf5jh 5 лет назад
very nice one! , thanks ,It's really a good Job
@vijayakumarkrishnan9269
@vijayakumarkrishnan9269 5 лет назад
Very nice video altogether... Since I am new to Spring Boot it would be great if it has some more explanations on the mapping side...
@Javatechie
@Javatechie 5 лет назад
Planning to upload Spring boot tutorial from basic
@anujsinghsomvanshi3385
@anujsinghsomvanshi3385 4 года назад
Thank you so much bro. It was very helpful for me.
@wilmerfroilan8991
@wilmerfroilan8991 6 лет назад
Upload a video using spring security, auth with JWT, and RESTFul API for consume from the vuejs frontend, login page, register (user management), please master ;)
@peteradegboyega2555
@peteradegboyega2555 3 года назад
Many thanks for this. Pls how can I use Ajax/Restful Service to get book details by id and show results in html input.
@asitkumarsahu5211
@asitkumarsahu5211 2 года назад
@basant Can you tell me @modelAttribute in spring mvc support content type json during Ajax call which passing json data?
@Javatechie
@Javatechie 2 года назад
No @ModelAttribute won't work
@Rash1987nus
@Rash1987nus 4 года назад
please help.. when i try run this project.... it is trying to create the bean .......trying to access the application.properties file and throwing the following error Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class
@rjcdz06
@rjcdz06 5 лет назад
Excellent! Thanks!
@maruthidanda2364
@maruthidanda2364 3 года назад
Super bro...
@nirmalaramesh3258
@nirmalaramesh3258 5 лет назад
Hi thanks for the vedio Can u share vedio for file upload to database
@chucknorris8921
@chucknorris8921 4 года назад
Hello, I tried to run the code from your GitHub, and I get a 500 bad request error when I try to post/get the books. I didn't make any changes to the code. Could you give me any solution?
@Javatechie
@Javatechie 4 года назад
To get a book you need to fire Get request not post
@chucknorris8921
@chucknorris8921 4 года назад
@@Javatechie Thank you for your reply! I found the problem, it was because of the WebSecurity, I was not sending the CSRF token. :)
@Javatechie
@Javatechie 4 года назад
@@chucknorris8921 cool 👍
@gopald7263
@gopald7263 6 лет назад
Awesome..
@tw5529
@tw5529 5 лет назад
Awesome..... I used your code. But, after starting the server . when I am hitting localhost:8080/home ,the home page is not coming out. Only Whitelevel Error page is showing. What's the reason for this issue? Could you please let me know?
@Javatechie
@Javatechie 5 лет назад
Check the URL mapping .pass the proper URL
@tw5529
@tw5529 5 лет назад
@@Javatechie Using same url, which is used by u
@shankeytyagi6428
@shankeytyagi6428 5 лет назад
Hi Prashant , Thanks for sharing the video. I am getting below error when I am trying to use your code in RestController : The constructor ServiceResponse(String, Book) is undefined. Can you help please . Waiting for your prompt reply.
@Javatechie
@Javatechie 5 лет назад
Do you have constructor in ServiceResponse class ? I used Lombok so used @AllArgsConstructor
@shankeytyagi6428
@shankeytyagi6428 5 лет назад
@@Javatechie Yes Prashant there is a constructor in ServiceResponse and I have also used the same Lombok, but it's still now working.
@Javatechie
@Javatechie 5 лет назад
Did you configured Lombok with your eclipse
@shankeytyagi6428
@shankeytyagi6428 5 лет назад
Yes I did Prashant
@SarthakGnR
@SarthakGnR 3 года назад
did you find the issue?
@53R61000
@53R61000 3 года назад
Hi, when I close the browser and open it again, the array of books is still loaded. Why? How can i fix it . Thanks!
@PRASHANTKUMAR-wd9ww
@PRASHANTKUMAR-wd9ww 6 лет назад
Can you post Video On Integration Testing And 1 Video On Spring Oauth Security
@Javatechie
@Javatechie 6 лет назад
PRASHANT sure will upload
@rajenderprasad1193
@rajenderprasad1193 5 лет назад
Super Bhai
@asfaqahmed8947
@asfaqahmed8947 4 года назад
Why i am getting constructor proble in serviceresponse i import lombok and add all annotation that you have used
@Javatechie
@Javatechie 4 года назад
You should configure lombok in your eclipse ide
@kongbullies6709
@kongbullies6709 4 года назад
have you done spring security login with ajax?
@Javatechie
@Javatechie 4 года назад
Using Ng http call I did not using ajax
@kongbullies6709
@kongbullies6709 4 года назад
@@Javatechie im having method not allowed 405 in my app, it's an ajax call login with spring security do you have any idea why this is happening?
@Javatechie
@Javatechie 4 года назад
Make sure to mention same http method in both client and server . Also inspect your browser and verify whethe initialr put call is happening from client or not
@kongbullies6709
@kongbullies6709 4 года назад
@@Javatechie put call meaning the put http method? i am using $.post in jquery
@Javatechie
@Javatechie 4 года назад
Yes put HTTP method to check cross origin
@충충-x6p
@충충-x6p 5 лет назад
cool man
@russelllongo9182
@russelllongo9182 4 года назад
Hi, great tutorial learned a lot. However, no matter what I try (and I am new to all this) I cannot get around the HTTP 400 Bad Request, specifically " Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986". Doing some research online, more than a few Stack Overflow discussions on the error seem to point to newer versions of Tomcat not permitting certain characters in the HTTP request, such as {},[], and | characters. One solution suggested adding -Dtomcat.util.http.parser.HttpParser.requestTargetAllow=|{} to the VM start up, or adding it to Tomcat properties, but the first option didn't work, and wouldn't know how to set Tomcat properties for an embedded Tomcat server in a Spring eclipse project (don't see the files an external Tomcat would expose). Also, supposedly requestTargetAllow was deprecated apparently in the lastest versions. So not sure what to do at this point. Any suggestions??
@Javatechie
@Javatechie 4 года назад
Hi Russell , can you share your code in GitHub so that I can check this out
@russelllongo9182
@russelllongo9182 4 года назад
@@Javatechie Hi, I just sent a reply, hopefully you received it with the github link. But just in case github.com/rlongo-dev/demo I tried to copy your code exactly as you presented it, but there are a few changes i made after several errors. First, I kept getting errors that the server expected the controller for "saveBook" to be an HTTP GET request, which confused me. No matter what I tried, it seemed it would not accept a post, so I set the mapping to @GetMapping in class BookController, then changed the postrequest.js to use a Get. That got rid of the issue with expecting a GET. But then I got the HTTP 400 Bad Request, specifically " Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986" when it attempted the GET. I am not very familiar with Tomcat, but the stack overflow answers were claiming the {} brackets were unacceptable for Tomcat 8 and later?
@vinalpatel3269
@vinalpatel3269 4 года назад
how should I get this code?
@Javatechie
@Javatechie 4 года назад
GitHub link mentioned in video description you can download and reuse it
@zonic1456
@zonic1456 6 лет назад
Nice
@kousikup23
@kousikup23 4 года назад
How to send multiple values to the controller
@Javatechie
@Javatechie 4 года назад
If you want to send multiple value then create a separate class and add attributes which you want to pass then do the post call
@kousikup23
@kousikup23 4 года назад
@@Javatechie Can you provide an example for this? I have created a dynamic form and it can be multiple rows and the data will be pass via ajax call. My data is looks like Ex: {name:["A", "B"], age:["23","21"]}
@manojraghvan8626
@manojraghvan8626 Год назад
Getting 500 error
@rachnasingh8976
@rachnasingh8976 4 года назад
cors error how to solve it plaese
@Javatechie
@Javatechie 4 года назад
Please add below snippet of code in your spring boot config or main class @Bean public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurerAdapter() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE").allowedOrigins("*") .allowedHeaders("*"); } }; }
@rachnasingh8976
@rachnasingh8976 4 года назад
ok sir
@rachnasingh8976
@rachnasingh8976 4 года назад
deprecation warning
@Javatechie
@Javatechie 4 года назад
Is your cors issue resolved ?
@rachnasingh8976
@rachnasingh8976 4 года назад
no
Далее
[Java] Старт в Spring MVC/Data и Ajax
23:17
Просмотров 5 тыс.
Ajax in Spring Boot Thymeleaf
31:46
Просмотров 17 тыс.
Spring Boot AJAX Get and Post Examples with jQuery
52:49
Spring Web MVC using Spring Boot
1:25:21
Просмотров 31 тыс.
Learning Java #7 - Thymeleaf and AJAX
59:53
Просмотров 1,1 тыс.
Spring Boot & Thymeleaf Tutorial (+ Bootstrap)
12:03
Просмотров 98 тыс.
How I'd Learn Web Development (If I Could Start Over)
6:55
Spring boot Jquery Ajax Crud
17:44
Просмотров 33 тыс.