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.