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!!