Как я могу добавить javaagents
к моему @SpringBootTest
экземпляру? Для производственного экземпляра я успешно установил, но не могу сделать то же самое с тестовыми экземплярами.
И я получил следующие предупреждения / ошибки:
-Reverting the lazy setting on the OneToOne or ManyToOne attribute [..] for the entity class [class ... since weaving was not enabled or did not occur.
Мой build.gradle.kts
val springInstrument: Configuration by configurations.creating
val eclipseLink: Configuration by configurations.creating
dependencies {
...
eclipseLink("org.eclipse.persistence:eclipselink:2.7.5")
springInstrument("org.springframework:spring-instrument:5.2.2.RELEASE")
...
}
val bootRun by getting(BootRun::class) {
jvmArgs = mutableListOf(
"-javaagent:${configurations.getByName("springInstrument").asPath}",
"-javaagent:${configurations.getByName("eclipseLink").asPath.substringBefore(":")}"
)
}