简体   繁体   English

如何按页面导航?

[英]How to navigate by pages?

I have a project in Maven, with Vaadin 8 framework using PostgreSQL. 我在Maven有一个项目,使用PostgreSQL的Vaadin 8框架。 I can't use Navigator class, because it doesn't work with spring boot. 我不能使用Navigator类,因为它不适用于spring boot。 How to make navigation in this project? 如何在这个项目中进行导航?

If you use Spring Boot, it is recommended to use Vaadin Spring and Vaadin Spring Boot add-ons 如果使用Spring Boot,建议使用Vaadin Spring和Vaadin Spring Boot附加组件

https://vaadin.com/directory/component/vaadin-spring/3.1.1 https://vaadin.com/directory/component/vaadin-spring/3.1.1

https://vaadin.com/directory/component/vaadin-spring-boot/3.1.1 https://vaadin.com/directory/component/vaadin-spring-boot/3.1.1

The add-on gives you SpringNavigator, which is modified version of Navigator which supports Spring. 附加组件为您提供SpringNavigator,它是支持Spring的Navigator的修改版本。

When using Spring add-on you can use @SpringView annotation with the views, and they will be automatically registered in SpringNavigator, which you can easily just autowire. 使用Spring附加组件时,可以在视图中使用@SpringView注释,它们将自动在SpringNavigator中注册,您可以轻松地自动装配。

There is more detailed documentation about the add-ons tand their use here 有关附加组件及其使用的详细文档

https://vaadin.com/docs/v8/framework/advanced/advanced-spring.html https://vaadin.com/docs/v8/framework/advanced/advanced-spring.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM