Skip to main content

I like to access an image from the web/imagesweb/images directory. I like to access this image in the spring controller spring controller, so iI can convert this image to byte[]byte[]. I am creating a chart andand this image is part of the chart display. So  , iI am using this byte[]byte[] to construct Graphic2d objectGraphic2d object. Closest iI have got to it is using thethis:

 FileSystemResource resource = new FileSystemResource("images/"+imageName); 

Currently, iI have stored this image in the package structure. I like to do better than this. I like to read directly from web/images dirweb/images directory. Please give me some advice., Thanks.

I like to access an image from the web/images directory. I like to access this image in the spring controller , so i can convert this image to byte[]. I am creating a chart and this image is part of the chart display. So  , i using this byte[] to construct Graphic2d object. Closest i got to it is using the

 FileSystemResource resource = new FileSystemResource("images/"+imageName); 

Currently, i have stored this image in the package structure. I like to do better than this. I like to read directly from web/images dir. Please advice. Thanks

I like to access an image from the web/images directory. I like to access this image in the spring controller, so I can convert this image to byte[]. I am creating a chart and this image is part of the chart display. So, I am using this byte[] to construct Graphic2d object. Closest I have got to it is using this:

FileSystemResource resource = new FileSystemResource("images/"+imageName); 

Currently, I have stored this image in the package structure. I like to do better than this. I like to read directly from web/images directory. Please give me some advice, Thanks.

Source Link

how to access image folder in spring application

I like to access an image from the web/images directory. I like to access this image in the spring controller , so i can convert this image to byte[]. I am creating a chart and this image is part of the chart display. So , i using this byte[] to construct Graphic2d object. Closest i got to it is using the

 FileSystemResource resource = new FileSystemResource("images/"+imageName); 

Currently, i have stored this image in the package structure. I like to do better than this. I like to read directly from web/images dir. Please advice. Thanks