Reputation: 1541
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
</dependency>
SpringBoot 2
Vaadin 12.0.3
@Route("")
public class IndexView {
I followed a video tutorial and the above example seems to work just fine. I don't have any xyz extends UI
class. When I hit localhost, I see my Index View rendered.
But other recent examples I see online show something like Main extends UI
.
Is a UI class necessary? If so, which UI should be imported. Examples show com.vaadin.ui.UI
while the only UI
class I see in the class path is com.vaadin.flow.component.UI
.
Upvotes: 0
Views: 60
Reputation: 1923
No, extending UI
is no longer necessary in Vaadin 10+. Any component with @Route("")
will be the root component.
Upvotes: 2