春季启动在Application.java包中的错误

huangapple go评论78阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年9月16日 07:19:12
  • 转载请务必保留本文链接:https://go.coder-hub.com/63911073.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定