title: Upload image, encode to base64 Spring MVC
body: <p>I have a question.
  I'm working on a Spring web MVC project where I need to upload
  an image, convert it to base64 and then write it to a mysql database. 
  I'm very new to spring and I've searched the web finding a lot of tutorials that just don't really fit my answer.
  I basically don't know where to start..do I use javascript to do this in the jsp file? Or is it better to use java? I literally have no idea where to start, it sounds difficult to me but I'm sure there is a very easy way to do this. I just have to get used to spring a little bit more. 
  Can someone please point me in a direction about how to do this? 
  Also, I'm using annotations and no xml.</p>
  
  <p>Thanks in advance!</p>