I am testing out a vaadin 10 application using spring boot. I used https://start.spring.io/ to generate a project. I followed the documentation of vaadin https://vaadin.com/docs/v10/flow/importing-dependencies/tutorial-include-css.html. There the following is stated: "You can place style sheets and other static resources in any folder inside your WAR file except for /VAADIN which is reserved for framework internal use. VaadinServlet handles static resource requests if you have mapped it to / . Otherwise, the servlet container will take care of static resource requests."
I created a stylesheet style.css and placed it under resources folder in my spring boot application. I referenced the stylesheet on my class using @StyleSheet("style.css"). I the classname of div has also been set. But when i run the application it seems my stylesheet is not being used. What is the proper way of placing a stylesheet?
@StyleSheet("style.css")
public class MainView extends VerticalLayout {
private TextField filter;
private Button addNewBtn;
public MainView() {
TestDiv testDiv = new TestDiv();
add(testDiv);
}
public class TestDiv extends Div {
public TestDiv() {
setText("TestDiv");
setClassName("custom-cell");
}
}
}