0
votes

Spring boot application using gradle throwing follwoing error

2020-09-08 18:18:41.444 INFO 16780 --- [ main] o.s.boot.SpringApplication : Starting SpringApplication v2.4.0-SNAPSHOT using Java 14.0.2 on DESKTOP-5UQMCR2 with PID 16780 (C:\Users\jophi.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot\2.4.0-SNAPSHOT\28d1eed982ce2c51809e5542c993ab84faa55390\spring-boot-2.4.0-SNAPSHOT.jar started by jophi in D:\WorkSpace\DIY_Project\DIY\DIY) 2020-09-08 18:18:41.445 INFO 16780 --- [ main] o.s.boot.SpringApplication : No active profile set, falling back to default profiles: default 2020-09-08 18:18:41.524 ERROR 16780 --- [ main] o.s.boot.SpringApplication : Application run failed

java.lang.IllegalArgumentException: Sources must not be empty at org.springframework.util.Assert.notEmpty(Assert.java:467) ~[spring-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT] at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:404) ~[spring-boot-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:325) ~[spring-boot-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1280) ~[spring-boot-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT] at org.springframework.boot.SpringApplication.main(SpringApplication.java:1296) ~[spring-boot-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]

1
What Gradle command are you running?tschumann

1 Answers

0
votes

I think you should start you app by running the main class..

Your main class should look something:

@SpringBootApplication
public class Application {

public static void main(String[] args) {
    SpringApplication.run(Application.class, args);
}