您可以按照以下步骤进行操作:
com.vaadin
vaadin-spring-boot-starter
package com.example.demo;
import com.vaadin.flow.component.html.Label;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.router.Route;
@Route("hello")
public class HelloWorldView extends VerticalLayout {
public HelloWorldView() {
Label label = new Label("Hello, Vaadin!");
add(label);
}
}
package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
通过按照以上步骤,您将能够创建一个简单的Vaadin视图,并在不需要PRO订阅的情况下进行测试。