title: How can i inject a bean into global velocity context in spring boot & spring mvc
body: <p>I am developing a website with spring boot, spring mvc and velocity, the question is How can i inject a bean such as <code>User</code> into <strong>global</strong> velocity context, and then i can use <code>$User.getName()</code> or <code>$User.address</code> in the global velocity templates(header.vm)?</p>
  
  <p>Note1:  <strong>global velocity context</strong> , not the individual request where i can inject objects by Model/ModelAndView etc.</p>
  
  <p>Note2: i have tried the annotation <code>@DefaultKey("User")</code>, but not work, maybe other configurations required? </p>