When building below Spring session sample using gradle: https://docs.spring.io/spring-session/docs/current/reference/html5/guides/boot-findbyusername.html
I encountered an error regarding to java.annotation module, anybody have idea how to resolve that?
/spring-session/spring-session-core/src/main/java/org/springframework/session/config/annotation/web/http/SpringHttpSessionConfiguration.java:22: error: package javax.annotation is not visible
import javax.annotation.PostConstruct;
^
(package javax.annotation is declared in module java.xml.ws.annotation, which is not in the module graph)
warning: unknown enum constant When.MAYBE
reason: class file for javax.annotation.meta.When not found
1 error
1 warning
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':spring-session-core:compileJava'.
> Compilation failed; see the compiler error output for details.
I tried to add below config in build.gradle however the problem remain.
tasks.withType(AbstractCompile) {
options.compilerArgs += ["--add-modules", "java.xml.bind"]
}
tasks.withType(Test) {
jvmArgs += ["--add-modules", "java.xml.bind"]
}
java.xml.ws.annotation
with-add-module
– Bombazine