我在 Spring Boot vaadin flow 应用程序中看不到页面

发布于 2025-01-10 05:43:51 字数 977 浏览 4 评论 0原文

虽然我的 spring boot vaadin flow 应用程序编译成功,但我在浏览器中看不到任何页面。当我运行 http://127.0.0.1:8080/hello 我只看到:

<块引用>

无法导航到“hello”可用路线:此详细消息仅在开发模式下运行时显示。

你能帮助我吗?我怀疑这是一个注释问题。下面我展示了3个类的注释:

    @Theme(themeClass = Lumo.class)
@CssImport("./styles/select-lumo-bright.css")
@SpringBootApplication

public class PayrollApplication  extends SpringBootServletInitializer implements AppShellConfigurator
{
    public static void main(String[] args) {
        SpringApplication.run(PayrollApplication.class, args);
    }
}

    @Component()
@ComponentScan("com.tool.jdbc")
@UIScope 
@Route(value = "hello", layout = MainView.class)
public class PanelMain extends Div implements Constants,AfterNavigationObserver {

public class MainView extends AppLayout implements Constants{

谢谢

While my spring boot vaadin flow application compiles successfully I cannot see any page in browser. When I run http://127.0.0.1:8080/hello I just see :

Could not navigate to 'hello' Available routes: This detailed message is only shown when running in development mode.

Can you help me? I suspect it is an annotation issue. Bellow I show the annotation of 3 classes:

    @Theme(themeClass = Lumo.class)
@CssImport("./styles/select-lumo-bright.css")
@SpringBootApplication

public class PayrollApplication  extends SpringBootServletInitializer implements AppShellConfigurator
{
    public static void main(String[] args) {
        SpringApplication.run(PayrollApplication.class, args);
    }
}

    @Component()
@ComponentScan("com.tool.jdbc")
@UIScope 
@Route(value = "hello", layout = MainView.class)
public class PanelMain extends Div implements Constants,AfterNavigationObserver {

public class MainView extends AppLayout implements Constants{

thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文