How do I enable Hibernate bytecode acceleration before running Intellij IDEA?

In gradle, you can achieve this using:

apply plugin: 'enhance'
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'org.hibernate:hibernate-gradle-plugin:VERSION'
    }
}
dependencies {
    compile group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-[SPEC-VERSION]-api', version: '[IMPL-VERSION]'
    compile group: 'org.hibernate', name: 'hibernate-gradle-plugin', version: 'VERSION'
}

What if, instead of running the project through Gradle, I want to run my main class directly through Intellij (shift-F10). Is it also possible to amplify the build time bytecode before running the application? How do I achieve this?

+2
source share
1 answer

Hibernate executes the “bytecode toolkit” at runtime, so you don’t need to do anything to make this happen.

This is actually not a toolkit bytecode, but rather a change to existing classes, but proxying, which means that existing classes are used by classes that are generated on the fly.

+2

Source: https://habr.com/ru/post/1694245/


All Articles