Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

819
Views
Gradle project error - java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication

This is my main application code:

package u.d.dip.rs.app;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;

@EnableWebSecurity
@SpringBootApplication
@ComponentScan(basePackages = "u.d.dip")
@EnableAutoConfiguration
public class DipApplication {
    public static void main(String[] args) {
        SpringApplication.run(DipApplication.class, args);
    }
}

I'm using gradle to build the project. Even though SpringApplication file is properly imported I'm getting the following error:

Caused by: java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 6 more

Process finished with exit code 1

I'm getting following gradle message when I hover over SpringApplication

[Gradle: org.springframework.boot:spring-boot:1.5.1.RELEASE] org.springframework.boot public class SpringApplication extends Object

Any help would be much appreciated. Thanks in advance!

about 4 years ago · Santiago Trujillo
3 answers
Answer question

0

If you are using IntelliJ Idea, the new version 2016.3.6 solved this issue.

about 4 years ago · Santiago Trujillo Report

0

The error was because of an issue with gradle 3.4 I've changed my gradle distribution to 3.2 and everything is working fine now.

Please refer this for more information: https://github.com/gradle/gradle/issues/1335

Hope this solves your problem.

about 4 years ago · Santiago Trujillo Report

0

I fix this error by change gradle3.4 to 3.2

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!