Polish WebUtilRuntimeHints

See gh-29112
This commit is contained in:
Sébastien Deleuze 2022-09-08 18:24:02 +02:00
parent bfa803baa4
commit d6c49eec5a
1 changed files with 3 additions and 1 deletions

View File

@ -18,6 +18,7 @@ package org.springframework.web.util;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.core.io.ClassPathResource;
/**
* {@link RuntimeHintsRegistrar} implementation that registers resource
@ -30,6 +31,7 @@ class WebUtilRuntimeHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
hints.resources().registerPattern("org/springframework/web/util/HtmlCharacterEntityReferences.properties");
hints.resources().registerResourceIfNecessary(
new ClassPathResource("HtmlCharacterEntityReferences.properties", getClass()));
}
}