title: SpringViewProvider for Spring UI in Vaadin
body: <p>I am trying to implement spring views in my vaadin application but I get an NPE on my SpringViewProvider ("Cannot add a null view provider"). This is my code:</p>
  
  <pre><code>@SpringUI(path = "permalink")
  @Theme("myTheme")
  public class PermalinkUI extends UI {
  
  @Autowired
  private SpringViewProvider springViewProvider;
  
  private Navigator navigator;
  
  @Override
  protected void init(VaadinRequest request) {
  
    final VerticalLayout root = new VerticalLayout();
    root.setSizeFull();
    root.setMargin(true);
    root.setSpacing(true);
    setContent(root);
  
    final Panel viewContainer = new Panel();
    viewContainer.setSizeFull();
    root.addComponent(viewContainer);
    root.setExpandRatio(viewContainer, 1.0f);
  
  
    navigator = new Navigator(this, viewContainer);
    navigator.addProvider(springViewProvider);
    setNavigator(navigator);
  
    setContent(root);
  </code></pre>
  
  <p>I have also tried to use a ViewDisplay instead of a single component container (root) but with the same result. I have also implemented a test view to navigate to:</p>
  
  <pre><code>@SpringView(name = "test")
  public class PermalinkTest extends VerticalLayout implements View {
  
  
  @Override
  public void enter(ViewChangeListener.ViewChangeEvent event) {
    removeAllComponents();
    String params = event.getParameters();
    addComponent(new Label(params));
   }
  }
  </code></pre>
  
  <p>I get this NPE when writing this URL "localhost:8080/permalink/test.
  What am I missing? Shouldn't the SpringViewProvider be autowired?</p>
  
  <p>Regards Johan</p>