简体   繁体   中英

How to navigate by pages?

I have a project in Maven, with Vaadin 8 framework using PostgreSQL. I can't use Navigator class, because it doesn't work with 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

https://vaadin.com/directory/component/vaadin-spring/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.

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.

There is more detailed documentation about the add-ons tand their use here

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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