简体   繁体   English

Application.java 包中的 Spring 启动错误

[英]Spring boot error in Application.java package

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您好,我刚刚在 spring boot 初始化程序中创建了一个项目,但是当我在 sts 中导入该项目时,出现了一组我不明白的错误

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.无法解析 java.lang.Class 类型。 It is indirectly referenced from required .class files它是从所需的 .class 文件间接引用的

Implicit super constructor Object() is undefined for default constructor.默认构造函数未定义隐式超级构造函数 Object()。 Must define an explicit constructor必须定义一个显式构造函数

String cannot be resolved to a type字符串无法解析为类型

All this error is in my Application.jave please help me所有这些错误都在我的 Application.jave 中,请帮助我

These error occurs when JRE is not set for the project.未为项目设置 JRE 时会发生这些错误。 Have a look at this link to set JRE.查看链接以设置 JRE。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM