i am making a project using vscode, and using react and springboot.
and is error message suddenly pops up, and bothers me.
Could not open cp_init generic class cache for initialization script ‘C:UsersdjwlsAppDataRoamingCodeUserworkspaceStorage5cb870b7bccc637bbe1a3f9df7c0c634Oracle.oracle-javauserdirvarcachegradlenb-tooling.gradle’ (C:Usersdjwls.gradlecaches8.6scripts4jbi8vk6y16d54n1snyxw6doj). BUG! exception in phase ‘semantic analysis’ in source unit ‘BuildScript‘ Unsupported class file major version 66
i think this may be caused by gradle.
but i don’t know the exact reason.
thank you for kind support:)
build. gradle
` plugins {
id ‘java’
id ‘org.springframework.boot’ version ‘3.2.4’
id ‘io.spring.dependency-management’ version ‘1.1.4’
}
group = ‘com.example’
version = ‘0.0.1-SNAPSHOT’
allprojects {
apply plugin: 'java'
// Java 버전을 명시적으로 설정
java {
sourceCompatibility = '17'
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.postgresql:postgresql'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.apache.logging.log4j:log4j-api:2.17.0'
implementation 'org.apache.logging.log4j:log4j-core:2.17.0'
implementation 'org.springframework.boot:spring-boot-starter-security'
}
tasks.named('test') {
useJUnitPlatform()
}
`
i tried many things but i dont get any clues.
dlwkdgks2378 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.