问题
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:
Error:java: Couldn't find type java.sql.Date. Are you missing a dependency on your classpath?
I'm using mongo java driver version 3.8.2, spring boot 2.1 and project is in Java 11. I have no idea what is wrong here could someone help me please?
回答1:
Settings -> Build, Execution, Deployment -> Build Tools -> Maven/Gradle -> Runner -> tic on "Delegate IDE build/run actions"
回答2:
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)
来源:https://stackoverflow.com/questions/54793087/couldnt-find-type-java-sql-date-are-you-missing-a-dependency-on-your-classpath