title: Spring MVC - Get reference data from database on server startup
body: <p>After reading lot of posts i am planning to use below approach to pull reference data from database (code not tested yet).</p>
  
  <pre><code>    @Override
      protected Map referenceData(HttpServletRequest request) throws Exception {
  
          //Data referencing for country list box
          Map referenceData = new HashMap();
          referenceData.put("countryList", articleService.getCountryList());
  
          //Data referencing for skills list box
          Map&lt;String,String&gt; javaSkill = new LinkedHashMap&lt;String,String&gt;();
          referenceData.put("skillsList", articleService.getSkillsList());
  
          return referenceData;
      }
  </code></pre>
  
  <p>Reference data table is as below</p>
  
  <pre><code>id  key     value               type
  -----------------------------------------
  1   1       United States       countries
  2   2       India               countries
  3   3       United Kingdom      countries
  4   4       China               countries
  5   1       Java                skills
  6   2       Spring              skills
  7   3       Hibernate           skills
  8   4       SQL                 skills
  </code></pre>
  
  <p>I have got two questions,</p>
  
  <ol>
  <li>This is a static reference data (i wont change it for months), so I dont want to hit database for every request and data should be loaded on server startup instead. How to do this?</li>
  <li>Is this the correct approach or i am complately wrong in understanding it?</li>
  </ol>