@Route("")
public class MainView extends VerticalLayout {
public MainView() {
greetButton.addClickListener(event -> {
String name = nameField.getValue();
});
add(nameField, greetButton);
}
}
public class Application extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(Application.class);
}
}
yaml
spring:
vaadin:
servlet:
production-mode: false