I made a simple application today that gives me a few errors when I run. I made another application very similar to this one yesterday which was working fine but is now broke as well
I am getting these errors:
Error:(4, 32) java: package org.springframework.boot does not exist Error:(5, 46) java: package org.springframework.boot.autoconfigure does not exist Error:(6, 35) java: package org.springframework.context does not exist Error:(9, 2) java: cannot find symbol symbol: class SpringBootApplication Error:(13, 17) java: cannot find symbol symbol: class ApplicationContext location: class com.example.dependencyinjection.DependencyInjectionApplication Error:(13, 42) java: cannot find symbol symbol: variable SpringApplication location: class com.example.dependencyinjection.DependencyInjectionApplication Error:(3, 38) java: package org.springframework.stereotype does not exist Error:(5, 2) java: cannot find symbol symbol: class Controller Here is my pom.xml
<?xml version="1.0" encoding="UTF-8"?> <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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.7.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.example</groupId> <artifactId>dependency-injection</artifactId> <version>0.0.1-SNAPSHOT</version> <name>dependency-injection</name> <description>Example project for Spring Boot</description> <properties> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot</artifactId> <version>1.2.3.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> <exclusions> <exclusion> <groupId>org.junit.vintage</groupId> <artifactId>junit-vintage-engine</artifactId> </exclusion> </exclusions> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> I have tried:
- Reimporting all Maven projects
- Generating sources and updating all folders for all projects
- Creating a new project using Spring initalizer
- Checking settings path for settings.xml
- Deleting the .m2 folder
- Invalidating caches and restarting
- Reopening the project with auto imports on
- Removing/altering VM options for imports
- Forcing Intellij to reread all maven dependencies
- Confirming that the dependencies are in Modules
- Updating Maven repositories
- Many different pom.xml configurations
- Cloning and building a project which is known to work
- Changing Maven's default executable
- Turning auto sync completely off
- Reinstalling Intellij
Any other ideas?
