Springboot Autowire by constructor fails on Tomcat Server

Hi Vaadin Team,

I’m using springboot in my Vaadin Project and I’ve got null pointer when try to inject data beans by constructor in components annotated @Route, such as the one below.

@PageTitle("Menu Data")
@Route(value = "menuData", layout = MainLayout.class)
public class MenuData extends VerticalLayout {

	@Autowired
	public MenuData(MenuService menuService) {

	}
}

then I’ve got this error
There was an exception while trying to navigate to 'menuData' with the exception message 'Unable to create an instance of 'menuData.views.MainLayout'. Make sure the class has a public no-arg constructor.'

Note: This issue only shown when I’m deploy application in Tomcat with *.war file.
I’m also already add extends SpringBootServletInitializer in springboot application.

What does your MainLayout class look like?

MainLayout like this:

@PWA(name = "Menu-Web", shortName = "Menu-Web", iconPath = "images/logos/logo-menu.png")
@Viewport("width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes")
public class MainLayout extends FlexBoxLayout
        implements RouterLayout, PageConfigurator, AfterNavigationObserver {
        
        public MainLayout() {
			initNavigation();
        }
        
}

Hai Vaadin Team,
any solution for this ?