1
0
mirror of synced 2026-08-05 17:57:15 +00:00

aot improvements

Signed-off-by: Josh Long <54473+joshlong@users.noreply.github.com>
This commit is contained in:
Josh Long
2026-02-19 09:10:13 -06:00
committed by Rob Winch
parent 1fdfd45782
commit 2dd2863550
12 changed files with 408 additions and 45 deletions
@@ -24,6 +24,7 @@ import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.aot.hint.TypeReference;
import org.springframework.core.io.ClassPathResource;
import org.springframework.security.web.access.expression.WebSecurityExpressionRoot;
import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken;
/**
* {@link RuntimeHintsRegistrar} for WebMVC classes
@@ -44,6 +45,10 @@ class WebMvcSecurityRuntimeHints implements RuntimeHintsRegistrar {
TypeReference
.of("org.springframework.security.web.csrf.CsrfTokenRequestAttributeHandler$SupplierCsrfToken"),
MemberCategory.INVOKE_DECLARED_METHODS);
hints.reflection()
.registerType(PreAuthenticatedAuthenticationToken.class,
(builder) -> builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.ACCESS_DECLARED_FIELDS));
ClassPathResource css = new ClassPathResource("org/springframework/security/default-ui.css");
if (css.exists()) {