Quarkus Datasource issues
Hi,
I am learning Quarkus by following this tutorial. At 19:03 I noticed that I do not get autocomplete for any of the quarkus.datasource properties, but I do get it for the quarkus.hibernate-orm property. The last mentioned is the only one that gets highlighted in orange by IntelliJ, whereas the other four are greyed out.
I decided to ignore this and move on, but when trying to generate persistence mapping like at 20:28 in the video, nothing happens for me when clicking OK in the Import Database Schema window.
I'm running IntelliJ Ultimate 2023.2.5 on Ubuntu 22.04.3LTS, with Docker Desktop. I have followed the tutorial exactly except for the difference that I chose Gradle with Kotlin DSL as build tool when generating the project at quarkus.io. Below is the build.gradle.kts file that was generated.
Thankful for any help!
plugins {
java
id("io.quarkus")
}
repositories {
mavenCentral()
mavenLocal()
}
val quarkusPlatformGroupId: String by project
val quarkusPlatformArtifactId: String by project
val quarkusPlatformVersion: String by project
dependencies {
implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
implementation("io.quarkus:quarkus-resteasy-reactive-jackson")
implementation("io.quarkiverse.jpastreamer:quarkus-jpastreamer:3.0.3.Final")
implementation("io.quarkus:quarkus-smallrye-openapi")
implementation("io.quarkus:quarkus-hibernate-orm-panache")
implementation("io.quarkus:quarkus-jdbc-mysql")
implementation("io.quarkus:quarkus-arc")
testImplementation("io.quarkus:quarkus-junit5")
}
group = "org.freecodecamp"
version = “1.0.0-SNAPSHOT”
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<Test> {
systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
}
请先登录再写评论。
Hi John,
Looks like some of the Quarkus dependencies are not being recognized.
Does it help if you manually reload the Gradle configuration for the project? To do that, open the Gradle tool window and click on the first button on the left - ‘Reload All Gradle Projects’.
Do you have this problem in the original Maven-based project? https://github.com/speedment/freeCodeCamp-tutorial
I noticed I have this issue as well. A clean Quarkus 3.7.4 project from code.quarkus.io with JDBC extensions using either Gradle or Maven as the build system has no autocomplete support for `quarkus.datasource`.
The linked project uses an older version of Quarkus (3.1.3) and autocomplete works there, same with the last supported 3.2 release (3.2.10.Final).
Both Quarkus versions include DataSourceJdbcRuntimeConfig in the classpath, but in case of the newer version it is now an interface instead of a class.
Using IJ 2023.3.4 and Quarkus plugin 233.14475.28.
Hello Konrad Brus ,
Indeed, autocompletion for `quarkus.datasource` properties doesn't work with Quarkus 3.7.4.
A YouTrack ticket was created for this issue: https://youtrack.jetbrains.com/issue/IDEA-347787
Please vote for it to prioritize it for the development team and receive notifications from the ticket.
See Watching YouTrack issues if you're not familiar with YouTrack.