title: Injecting dependency inside AbstractWebSocketHandler
body: <p>How to inject a dependency inside a Web Socket handler:</p>
  
  <pre><code>public class WebsocketHandler extends AbstractWebSocketHandler {
      @Autowired
      GreetingMap greetingMap;
  
      @Override
      protected void handleTextMessage(WebSocketSession session, TextMessage message) throws IOException {
          // NullPointerException here
          String greeting = greetingMap.getSampleGreetings().get("hello") + " " + message.getPayload();
          session.sendMessage(new TextMessage(greeting));
      }
  }
  </code></pre>
  
  <p>The code above throws <code>NullPointerException</code> </p>
  
  <p>What could be missing here? </p>