Inject controller in Vaadin view Spring Boot

Hi everyone,

I developing an application web with Spring Boot and Vaadin for the application interface.

My problem is can’t inyect the controller to view, the application starts OK, but the bean is it null in execution.

My controller:

public class ViewController {

/** Inyección de Spring para poder acceder a la capa de datos.*/
private CommonSetup commonSetup;

 * This method gets the user from db.
public Temployee getUser(String username, String password) {
    Temployee empl = null;
    // get from db the user
    empl = commonSetup.getUserByUsernameAndPass(username, password);

    // return the employee found.
    return empl;

My view:

public class LoginView extends CustomComponent implements View ,Button.ClickListener {

/** The view controller. */
private ViewController   vContr;

public LoginView() {

   // Check if the username and the password are correct.
   Temployee empleado = vContr.getUser(username, password);

In the LoginView the bean VioewController is null.

How I can inyect the bean in the view?


Share the spring application config,