0
我将Spring Boot应用程序从1.3.4更新到1.4.3,并使用Gradle Refresh刷新项目。我现在在我的主应用程序类中有一个错误:更新到新版本后无法编译Spring Boot项目
- 该项目未建成,因为其构建路径不完整。 找不到java.lang.Object的类文件。修复构建路径然后尝试构建此项目 BeverageDataServices未知Java问题
无法解析java.lang.Object类型。这是间接 从所需的.class文件 引用
BeverageDataServicesApplication.java/BeverageDataServices/src目录/主/ JAVA/COM /贝尔特/饮料
这里是主要的应用程序类:
package com.xxx.beverage;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.mail.MailSenderAutoConfiguration;
import org.springframework.boot.orm.jpa.EntityScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication (exclude = {DataSourceAutoConfiguration.class, MailSenderAutoConfiguration.class})
@ComponentScan(basePackages = "com.xxx.xxx")
@EntityScan("com.xxx.xxx.model")
@EnableScheduling
public class BeverageDataServicesApplication {
public static void main(String[] args) {
SpringApplication.run(BeverageDataServicesApplication.class, args);
}
}
这些阅读类似于Gradle编译问题,而不是Spring Boot问题。一定要使用JDK 8或更高版本。 – duffymo
首先执行'./gradlew clean check'(在命令行上)......但您可能会遇到其他一些错误。 –
Gradle clean works ...我在Spring STS IDE中遇到错误... – Don