我正在尝试使用VSCode开发一个gradle项目。我安装了以下 VSCode 扩展:
但遗憾的是,导入无法解决。我在 C/C++ 中失败了 LSP,但在 java 中失败了。以下问题是我感兴趣的,可能有助于更好地说明问题:
Gradle for Java
和Language Support for Java
有什么关系?我认为如果不知道 Language Support for Java
中的依赖关系,
build.gradle
Language Support for Java
中打印已索引的包的调试信息?这是我的build.gradle:
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java application project to get you started.
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.8/userguide/building_java_projects.html in the Gradle documentation.
*/
plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
dependencies {
// Use JUnit Jupiter for testing.
testImplementation libs.junit.jupiter
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
// This dependency is used by the application.
implementation libs.guava
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web
implementation 'org.springframework.boot:spring-boot-starter-web:3.3.3'
compileOnly 'org.projectlombok:lombok:1.18.34'
annotationProcessor 'org.projectlombok:lombok:1.18.34'
testCompileOnly 'org.projectlombok:lombok:1.18.34'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.34'
}
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
application {
// Define the main class for the application.
mainClass = 'moso_blog.App'
}
tasks.named('test') {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}
请帮助我解决缺少的
lombok
依赖关系