Merge branch '3.0.x' into 3.1.x
Closes gh-36121
This commit is contained in:
@@ -18,6 +18,12 @@ package org.springframework.boot.autoconfigure.freemarker;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.aot.hint.RuntimeHints;
|
||||
import org.springframework.aot.hint.RuntimeHintsRegistrar;
|
||||
import org.springframework.aot.hint.TypeHint;
|
||||
import org.springframework.beans.factory.aot.AotServices;
|
||||
import org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider.FreeMarkerTemplateAvailabilityProperties;
|
||||
import org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider.FreeMarkerTemplateAvailabilityRuntimeHints;
|
||||
import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider;
|
||||
import org.springframework.core.io.DefaultResourceLoader;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
@@ -84,4 +90,14 @@ class FreeMarkerTemplateAvailabilityProviderTests {
|
||||
.isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldRegisterFreeMarkerTemplateAvailabilityPropertiesRuntimeHints() {
|
||||
assertThat(AotServices.factories().load(RuntimeHintsRegistrar.class))
|
||||
.hasAtLeastOneElementOfType(FreeMarkerTemplateAvailabilityRuntimeHints.class);
|
||||
RuntimeHints hints = new RuntimeHints();
|
||||
new FreeMarkerTemplateAvailabilityRuntimeHints().registerHints(hints, getClass().getClassLoader());
|
||||
TypeHint typeHint = hints.reflection().getTypeHint(FreeMarkerTemplateAvailabilityProperties.class);
|
||||
assertThat(typeHint).isNotNull();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,12 @@ package org.springframework.boot.autoconfigure.groovy.template;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.aot.hint.RuntimeHints;
|
||||
import org.springframework.aot.hint.RuntimeHintsRegistrar;
|
||||
import org.springframework.aot.hint.TypeHint;
|
||||
import org.springframework.beans.factory.aot.AotServices;
|
||||
import org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAvailabilityProvider.GroovyTemplateAvailabilityProperties;
|
||||
import org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAvailabilityProvider.GroovyTemplateAvailabilityRuntimeHints;
|
||||
import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider;
|
||||
import org.springframework.core.io.DefaultResourceLoader;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
@@ -84,4 +90,14 @@ class GroovyTemplateAvailabilityProviderTests {
|
||||
.isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldRegisterGroovyTemplateAvailabilityPropertiesRuntimeHints() {
|
||||
assertThat(AotServices.factories().load(RuntimeHintsRegistrar.class))
|
||||
.hasAtLeastOneElementOfType(GroovyTemplateAvailabilityRuntimeHints.class);
|
||||
RuntimeHints hints = new RuntimeHints();
|
||||
new GroovyTemplateAvailabilityRuntimeHints().registerHints(hints, getClass().getClassLoader());
|
||||
TypeHint typeHint = hints.reflection().getTypeHint(GroovyTemplateAvailabilityProperties.class);
|
||||
assertThat(typeHint).isNotNull();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user