SPRINGBOOT + VAADIN deploy war with theme

Hi guys! I’m getting trouble on deploy a war file with springboot and vaadin.
I’ve created a new project with intellij using springboot initializer (VAADIN, WEB, MYSQL, JDBC).
By defautl this project doesn’t have the VAADIN THEME FOLDER.
SO I created the folder as Alejandro Duarte explained on this video
https://www.youtube.com/watch?v=USF35wZPxZk
Great, I can now use the CSS in my application.
The problem rise when I try to deploy the application as a WAR,I’m getting the 404 ERROR
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

this is the default POM.XML generated, I just added the depency “spring-boot-starter-tomcat”

<?xml version="1.0" encoding="UTF-8"?>


4.0.0

<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<name>superstar</name>
<description>Demo project for Spring Boot</description>

<parent>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-parent</artifactId>
	<version>2.0.1.RELEASE</version>
	<relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	<java.version>1.8</java.version>
	<vaadin.version>8.3.1</vaadin.version>
</properties>

<dependencies>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-jdbc</artifactId>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-web</artifactId>
	</dependency>
	<dependency>
		<groupId>com.vaadin</groupId>
		<artifactId>vaadin-spring-boot-starter</artifactId>
	</dependency>

	<dependency>
		<groupId>mysql</groupId>
		<artifactId>mysql-connector-java</artifactId>
		<scope>runtime</scope>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-test</artifactId>
		<scope>test</scope>
	</dependency>

	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-tomcat</artifactId>
		<scope>provided</scope>
	</dependency>


</dependencies>

<dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>com.vaadin</groupId>
			<artifactId>vaadin-bom</artifactId>
			<version>${vaadin.version}</version>
			<type>pom</type>
			<scope>import</scope>
		</dependency>
	</dependencies>
</dependencyManagement>

<build>
	<plugins>
		<plugin>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-maven-plugin</artifactId>
		</plugin>
	</plugins>
</build>

this the applicationClass

@SpringBootApplication
public class SuperstarApplication extends SpringBootServletInitializer {

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
	return application.sources(SuperstarApplication.class);
}

public static void main(String[] args) {
	SpringApplication.run(SuperstarApplication.class, args);
}

}

I try to create the folde WEBAPP/VAADIN/THEME under SRC/MAIN but the same error arises.
I believe is just a little thing has to be specified in the POM…

thanks for your help!!

This is not an answer but, by any chance were you able to fix this problem? I had that same issue while following the old Youtube tutorials. Thanks!

John Paulo Mataac:
This is not an answer but, by any chance were you able to fix this problem? I had that same issue while following the old Youtube tutorials. Thanks!

I John! Actually I don’t remember how I fixed it…
Anyway that project is still working. If you’re using vaadin 8, follow the great Aleandro’s video in order to create the folders you need "webapp/VAADIN/themes/mytheme.

once you have the folders, I copied it under “src”, the relative path should be “src/main/webapp”
In the pom.xml I added this under ;

	<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-clean-plugin</artifactId>
			<version>3.0.0</version>
			<!-- Clean up also any pre-compiled themes -->
			<configuration>


				<filesets>
					<fileset>
						<directory>src/main/webapp/VAADIN/themes</directory>
						<includes>
							<include>**/styles.css</include>
							<include>**/styles.scss.cache</include>
						</includes>
					</fileset>
				</filesets>

			</configuration>
		</plugin>

Here the mytheme.scss file:

@import “…/valo/valo.scss”;
@import “addons.scss”;

@mixin mytheme {
@include valo;
@include addons;

.v-button-mystyle {
background: #191970;
font-size: 12pt;
font-weight: bold;
color: #FF8C00;
border-color: #ff8c00;
border-radius: 4px;
border-width: 1px;

  }
  ...

let me if you fixed it!