quarkus и jandex и явные сущности jpa - PullRequest
0 голосов
/ 24 октября 2019

Я получаю сообщения об ошибках в сущностях JPA в своем доказательстве концепции quarkus.

2019-10-24 13:08:09,303 WARN  [io.qua.agr.dep.AgroalProcessor] (build-27) Agroal dependency is present but no driver has been defined for the default datasource
2019-10-24 13:08:09,515 WARN  [io.qua.dep.ste.ReflectiveHierarchyStep] (build-20) Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:
        - com.me.quaaaaaaakusone.domain.EmployeeEntity
        - com.me.quaaaaaaakusone.domain.JobTitleEntity
Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.");.

Я нашел этот пост:

Как создать индекс Jandex в Quarkus дляклассы во внешнем модуле

, и я сделал то, что говорит ответ SOF, что также есть в журналах:

пустой META-INF / beans.xml

Но я все еще получаю вышеупомянутое ПРЕДУПРЕЖДЕНИЕ.

На самом деле я ищу:

Как ЯВНО ЯВНО сообщать quarkus о расположении моих сущностей JPA.

Моя основная цель - сократить время запуска, поэтому я стараюсь максимально избегать (избыточного) сканирования.

Я использую Gradle, поэтому у меня возникают проблемы с идентификацией groupid. и артефакт моих подмодулей.

Я нашел это:

https://plugins.gradle.org/plugin/org.galaxx.gradle.jandex

, но он не говорит вам, как его реализовать. << Gaaaaaaaaa </p>

Вопреки простым примерам. Я наслоил свой код, и у меня есть (под) модули для сущностей в подмодуле: domain.

Моя структура папок выглядит следующим образом:

myRootFolder\apicore\src\main\java
myRootFolder\apicore\src\main\resources

myRootFolder\dal\src\main\java
myRootFolder\dal\src\main\resources

myRootFolder\domain\src\main\java
myRootFolder\domain\src\main\resources

myRootFolder\restlayer\src\main\java
myRootFolder\restlayer\src\main\resources

Мои настройки. :

pluginManagement {
    repositories {
        mavenLocal()
        mavenCentral()
        gradlePluginPortal()
    }
    resolutionStrategy {
        eachPlugin {
            if (requested.id.id == 'io.quarkus') {
                useModule("io.quarkus:quarkus-gradle-plugin:${quarkusVersion}")
            }
        }
    }
}

rootProject.name = 'quaaaaaaakusoneRoot'

include 'domain'
include 'dal'
include 'apicore'
include 'restlayer'
...