I have:
Windows 10, openjdk 11, spring tool suite 4.1.1, gradle 6.5, springboot 2.1 or 2.3
With this, when I import gradle project, I start seeing errors in STS like:
Evaluates project setup fixes to resolve the reference to the missing
element 'Autowired'
Evaluates project setup fixes to resolve the reference to the missing
element 'RestController'
I have tried commands like :
./gradlew --build-cache clean
./gradlew assemble
./gradlew --refresh-dependencies
Still I see the same error.
If I go to project, right click and go to Gradle - Refresh Gradle Project I see below errors in Console:
> Task :nothing UP-TO-DATE
Could not resolve: org.springframework.boot:spring-boot-starter-web
Could not resolve: org.springframework.boot:spring-boot-starter-jdbc
Could not resolve: org.springframework.cloud:spring-cloud-starter-config:2.2.3.RELEASE
Could not resolve: org.springframework.boot:spring-boot-starter-hateoas
Could not resolve: com.oracle:ojdbc8:12.2.0.1
Could not resolve: org.springframework.boot:spring-boot-starter-actuator
Could not resolve: org.mockito:mockito-junit-jupiter:2.18.3
Could not resolve: org.springframework:spring-test:5.1.4.RELEASE
Could not resolve: org.junit.jupiter:junit-jupiter-engine:5.2.0
BUILD SUCCESSFUL in 775ms
How to fix such errors?