title: convert properties file to hashmap in spring
body: <p>I need to load all of the content of my properties file which looks something like this:</p>
  
  <pre><code>some.properties
  
  key.1=this item needs to be loaded onto a hashmap
  key.2=this item also needs to be loaded onto a hashmap
  key.3=this item also needs to be loaded onto a hashmap
  key.4=this item also needs to be loaded onto a hashmap
  </code></pre>
  
  <p>I want to know a way in which i can load all of the content from my  properties file onto a hashmap. The actual content that is present against every key is very lengthy, so i cannot make my properties file as abc=aa,bb,cc and then load it onto my java class using the @Value annotation.</p>
  
  <p>Also, I have around 40 keys in my properties file. So, im trying to use this approach, As i dont want to add @Value annotation separately for every value in my java class.</p>
  
  <p>As, on my hashmap i will put in certain checks to load which keys and then set those parameters one by one into my variables and pass it for further processing.</p>
  
  <p>I tried a lot of things load the properties file and convert it into a hashmap through spring, all i now know is that i can make use of Property Placeholder Configurer which could load all of the properties file. However, how do i access the content inside the properties file in my java class converting it onto a hashmap.</p>
  
  <p>Any help will be highly appreciated.</p>
  
  <p>Thanks!</p>