Annotation Interface CompileWithForkedClassLoader
@Target({TYPE,METHOD})
@Retention(RUNTIME)
@Documented
@ExtendWith(org.springframework.core.test.tools.CompileWithForkedClassLoaderExtension.class)
public @interface CompileWithForkedClassLoader
Annotation that registers a JUnit Jupiter extension for test classes or test
methods that need to use a forked classloader with compiled code.
The extension allows the compiler to define classes without polluting the
test ClassLoader.
NOTE: this annotation cannot be used in conjunction with
@TestTemplate methods.
Consequently, @RepeatedTest and
@ParameterizedTest methods
are not supported.
- Since:
- 6.0
- Author:
- Phillip Webb, Sam Brannen