When you call GET /api/products (get all products for home page) it will send too much data and slow down page loading because it includes all the image data stored in the byte arrays. We don't even use this data because each image is grabbed separately using GET /api/product/{id}/image. I learned that you can correct this by setting up a JPA Data Projection, which will only grab certain columns you specify. EDIT: Of course, as was mentioned it would be better to avoid storing the byte data in our RDBMS altogether and use some kind of blob storage instead.
You have to learn JavaScript to understand React. Watching React code and I don't understand how it works. I need to learn, learn and learn again. Thanks for the lesson. It was interesting.
00:05 Troubleshooting image display and stock visibility issues 00:58 Resolving backend code issues and working with product details 01:52 Creating method for fetching image by product ID 02:43 Fetching and saving product image in bytes format 03:30 Returning image data and setting content type 04:27 Sending response in proper bite format 05:24 Successfully adding products and managing UI features 06:22 Integrating front end and back end for fetching data
when u are sending binary data from backend it is recieved in frontend and response type u will see here 1:48 is blob which will convert it into a image.... when sending binary data we specified the content type to jpg and in the frontend we are creating a imageurl of that image file to use that
Sir I have a doubt here, what if we want to get a list of product to show in frontend and for that we will call the api....We will get the List but in that scenario how to handle this image file?
Sir you have already uploaded spring boot in this channel ,so this playlist and the previous playlist is same or different ,which i have to learn pls reply Sir!
sir i have done the same thing as what you have done in the video but the problem is i am not able to get add to cart it still says out of stock could you fix this problem?
i just cannot get the image dynamically loaded, no matter what i do. It is showing correct name, type and size in h2 console, and even showing the image when i manually the src through inspect element in page, but not loading the image, stock available and out of stock button. anyone has any idea what might be going wrong?
When you call GET /api/products (get all products for home page) it will send too much data and slow down page loading because it includes all the image data stored in the byte arrays. We don't even use this data because each image is grabbed separately using GET /api/product/{id}/image. I learned that you can correct this by setting up a JPA Data Projection, which will only grab certain columns you specify.
EDIT: Of course, as was mentioned it would be better to avoid storing the byte data in our RDBMS altogether and use some kind of blob storage instead.
You have to learn JavaScript to understand React. Watching React code and I don't understand how it works. I need to learn, learn and learn again.
Thanks for the lesson. It was interesting.
Hi Naveen, could you please start a series in telugu on Leetcode problems??
00:05 Troubleshooting image display and stock visibility issues
00:58 Resolving backend code issues and working with product details
01:52 Creating method for fetching image by product ID
02:43 Fetching and saving product image in bytes format
03:30 Returning image data and setting content type
04:27 Sending response in proper bite format
05:24 Successfully adding products and managing UI features
06:22 Integrating front end and back end for fetching data
I do have one doubt. We are sending byte[] to the ui right where it will convert to image
when u are sending binary data from backend it is recieved in frontend and response type u will see here 1:48 is blob which will convert it into a image.... when sending binary data we specified the content type to jpg and in the frontend we are creating a imageurl of that image file to use that
best content 💯
Really enjoying a lot
Thank you for the video
Nice Content!
Awesome content
Pls upload a real time project by using spring boot and react js till the production
++
when i click on product it is showing me loading and in the last of url showing me undefined .....plz someone help me
Thank you
thank you sir
how to test it from postman .
Thanks 🎉❤
Sir I have a doubt here, what if we want to get a list of product to show in frontend and for that we will call the api....We will get the List but in that scenario how to handle this image file?
Looking forwared to update and delete video!
He doesn't explain what it is; he's just trying to implement a simple e-commerce project.
Sir you have already uploaded spring boot in this channel ,so this playlist and the previous playlist is same or different ,which i have to learn pls reply Sir!
this series is about a project, i suggest you to watch the previous playlist of srpingboot first
sir i have done the same thing as what you have done in the video but the problem is i am not able to get add to cart it still says out of stock could you fix this problem?
Its hard to understand return block of code, because it is called "train wreck" code function after function...
image is showing in my project what is the solution
i just cannot get the image dynamically loaded, no matter what i do.
It is showing correct name, type and size in h2 console, and even showing the image when i manually the src through inspect element in page, but not loading the image, stock available and out of stock button.
anyone has any idea what might be going wrong?
If you get a solution do let me know, that can be of great help to me-
Thank you.
I get a new error called 'application/octet-stream' when i try to upload. can anyone help me with this
Hi sir. I don't have any knowledge of programming. How to start coding.
Hey im also in your stage u can start with python course of this man he already uploaded full playlist
Sir,when is complete java developer course new batch coming out?.
Hi sir. I don't have any knowledge of programming. How to start coding.