title: best way to create a global variable in Spring MVC
body: <p>All of my controllers (requestMapping url) start with the same variable.</p>
  
  <pre><code>myController/blablabal
  </code></pre>
  
  <p>I am thinking about creating a global variable to replace "myController" so in the future if I change the URL name, I only need to change at one place.
  The way I am currently doing this is to create a bean.
  My bean config file:</p>
  
  <pre><code>&lt;bean id="controllerURL" class="java.lang.String"&gt;
      &lt;constructor-arg type="String" value="tt"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Then in my controller:</p>
  
  <pre><code>@RequestMapping(value ="/${controllerURL}/qrcode/blablbal", method = RequestMethod.GET)
  </code></pre>
  
  <p>However, it seems that I can not access this variable <code>controllerURL</code> correctly. Am I missing anything here? Or do we have a better way to create a global variable in Spring MVC?</p>