where should I place Vaadin Maven Spring Boot CSS files?

Hello

I am trying to get up to speed on Vaadin. In Spring Boot MVC, CSS and Static files a generall put in the resource folder. I’ve seen a couple of Vaadin related web posting about CSS and basically, they advise to put the CSS file in the WebFolder, which does not exist in a Maven MVC. Please advise how to create and reference CSS files in a Maven spring boot project. A pointer to an example would be great.

Thank you for your help

Hello,

I put the VAADIN folder (with my theme) in src/main/resources for my spring boot application.

And i configure my pom.xml, you can see a project with this configuration here ( https://github.com/peholmst/vaadin4spring/tree/master/samples/sidebar-sample )

<plugin>
  <groupId>com.vaadin</groupId>
  <artifactId>vaadin-maven-plugin</artifactId>
  <version>${vaadin.version}</version>
  <configuration>
    <theme>mytheme</theme>
    <warSourceDirectory>${basedir}/src/main/resources</warSourceDirectory>
  </configuration>
  <executions>
<execution>
<goals>
<goal>resources</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
<goal>compile-theme</goal>
</goals>
</execution>
</executions>
/plugin>

In the Vaadin demo projects, VAADIN folder is put in webapp folder. I don’t know why (and I think your cannot run it as a jar, only as a war according to this link https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-developing-web-applications.html ).