英文:
Spring boot error in Application.java package
问题
package com.example.filter.influenceur.influenceur;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class InfluenceurApplication {
public static void main(String[] args) {
SpringApplication.run(InfluenceurApplication.class, args);
}
}
错误信息如下:
无法解析类型 java.lang.Class。它在所需的 .class 文件中间接引用
隐式超类构造函数 Object() 未定义默认构造函数。必须定义显式构造函数
无法将 String 解析为类型
所有这些错误都在我的 Application.java 文件中,请帮我解决。
英文:
hello I just created a project in spring boot initializer but when I import the project in sts I have a set of errors that I do not understand
package com.example.filter.influenceur.influenceur;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class InfluenceurApplication {
public static void main(String[] args) {
SpringApplication.run(InfluenceurApplication.class, args);
}
}
the errors are :
> The type java.lang.Class cannot be resolved. It is indirectly referenced from required .class files
> Implicit super constructor Object() is undefined for default constructor. Must define an explicit
constructor
> String cannot be resolved to a type
All this error is in my Application.jave please help me
答案1
得分: 0
这些错误在项目中未设置 JRE 时发生。请查看此链接以设置 JRE。
英文:
These error occurs when JRE is not set for the project. Have a look at this link to set JRE.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论