JDBC driver class not resolved in Spring Boot application.yml during code analysis
In IntelliJ IDEA 2018.2.6, when IDEA makes a code analysis of my Spring Boot application.yml with this JDBC driver config:
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.zaxxer.hikari.HikariDataSource
it complains with
Error:(23, 28) Cannot resolve class or package 'mysql'
Error:(23, 34) Cannot resolve class or package 'cj'
Error:(23, 37) Cannot resolve class or package 'jdbc'
Error:(24, 15) Cannot resolve class or package 'zaxxer'
Error:(24, 22) Cannot resolve class or package 'hikari'
Is there any way to avoid this?
I use:
IntelliJ IDEA 2018.2.6 (Ultimate Edition)
Build #IU-182.5107.16, built on November 6, 2018
Licensed to REWE Digital GmbH / Stefan Scheidt
You have a perpetual fallback license for this version
Subscription is active until September 2, 2019
JRE: 1.8.0_152-release-1248-b22 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
Please sign in to leave a comment.
Hello Stefan,
Is it possible to share sample project example or at least pom.xml/build.gradle file?
I will as soon as possible.
You can find a sample project here:
https://github.com/stefanscheidt/sample-service
Interestingly, here only com.mysql.cj.jdbc can not be resolved.
Stefan,
Thanks for example!
I reported issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-202820
Please follow it for updates.
Great, thanks!