简体   繁体   中英

Couldn't find type java.sql.Date. Are you missing a dependency on your classpath?

I'm trying to run my application in Spring Boot using MongoDB with spring-data but I can't because IntelliJ shows me this error during build:

Are you missing a dependency on your classpath?

Settings -> Build, Execution, Deployment -> Build Tools -> Maven/Gradle -> Runner -> tic on “Delegate IDE build/run actions”

IDEA > File > Settings > Build, Execution, Deployment > Compiler > Annotation Processors

  • click/select the module in which you're encountering the troubles (middle part of the settings window)
  • ensure "Obtain processors from project classpath" is ticked (unselect custom "Processor path" option)

the problem came from this settings: 在此处输入图像描述

Please uncheckUser'--release' option for cross-compilation(Java 9 and later), it's a common source of problem with the library Date

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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