How can I add javaagents to my @SpringBootTest instance? To the production instance I successfully set but I cant do the same with the test instances.
And I got the following warnings/errors:
-Reverting the lazy setting on the OneToOne or ManyToOne attribute [..] for the entity class [class ... since weaving was not enabled or did not occur.
My 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(":")}"
)
}
Aucun commentaire:
Enregistrer un commentaire