Segui todos os passos do instrutor no projeto listavip, porém quando vou rodar o projeto, (Run as Java Application) está gerando o seguinte erro:
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext
at br.com.alura.listavip.Configuracao.main(Configuracao.java:10)
Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
Minha classe Configuração.java
package br.com.alura.listavip;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Configuracao {
public static void main(String[] args) {
SpringApplication.run(Configuracao.class, args);
}
}
Meu pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.alura.listavip</groupId>
<artifactId>listavip</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.0.1.RELEASE</version>
</dependency>
</dependencies>
</project>
Alguém pode me ajudar?