Using Push anotation on spring boot

Im using vaadin’s integration with Spring Boot and I have a class where i’d like to use @Push. Code (simplified)is the following:

public class MainView extends VerticalLayout {

    private ExecutorService executorService = Executors.newCachedThreadPool();
    private Span a = new Span();

    public MainView() {

        add(new H1("Jardín Ale"));

        Paragraph paragraph = new Paragraph("Thing ");


    protected void onAttach(AttachEvent attachEvent) {
        executorService.submit(() -> {
            while (true) {

    protected void onDetach(DetachEvent detachEvent) {

Next message will have the error

If i don’t add the @Push it ofc doesn’t work, but when i add it i get the following error:

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
    at  org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh( ~[spring-boot-2.7.5.jar:2.7.5]
    at ~[spring-context-5.3.23.jar:5.3.23]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh( ~[spring-boot-2.7.5.jar:2.7.5]
    at org.springframework.boot.SpringApplication.refresh( ~[spring-boot-2.7.5.jar:2.7.5]
    at org.springframework.boot.SpringApplication.refreshContext( ~[spring-boot-2.7.5.jar:2.7.5]
    at ~[spring-boot-2.7.5.jar:2.7.5]
    at ~[spring-boot-2.7.5.jar:2.7.5]
    at ~[spring-boot-2.7.5.jar:2.7.5]
    at com.example.application.Application.main( ~[main/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke( ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke( ~[na:na]
    at java.base/java.lang.reflect.Method.invoke( ~[na:na]
    at ~[spring-boot-devtools-2.7.5.jar:2.7.5]

There is more stacktrace, here is an image of it

Push is not allowed to be placed on view classes

It has to be placed on a class implementing AppShellConfigurator

On this example it is being used on a view class right?

And it also does it in this tutorial:

It has changed between Vaadin 23 ( from 15 if I remember correctly) and 14 : Server Push | Advanced Topics | Vaadin Docs and Server Push Configuration | Advanced Topics | Flow | Vaadin 14 Docs

TYVM guys

Vaadin should update the tutorial or at least say that’s outdated

@vital-koala, can you add a note on the training video page?