You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.
This is a relatively minor issue as far as I can tell. My resource-config.json generated by spring-aot contains both wildcarded directories, and the complete listing of the directory contents as well. Presumably only one is necessary.
The actual regex values (i.e. ^static/.* and ^templates/.*) come from a @ResourceHint on CommonWebInfos (and there will be other equivalents elsewhere presumably).
The individual entries come from BootstrapCodeGenerator.generate() which seems to simply add everything present in the source resource folders.
if (!resourceFolders.isEmpty()) {
logger.debug("Processing resource folders: " + resourceFolders);
for (PathresourceFolder : resourceFolders) {
intresourceFolderLen = resourceFolder.toString().length() + 1;
if (Files.exists(resourceFolder)) {
Files.walk(resourceFolder).filter(p -> !p.toFile().isDirectory()).forEach(p -> {
StringresourcePattern = p.toString().substring(resourceFolderLen);
if (!resourcePattern.startsWith("META-INF/native-image")) {
StringplatformNormalisedResourcePattern = resourcePattern.replace("\\", "/");
logger.debug("Resource pattern: " + platformNormalisedResourcePattern);
// TODO recognize resource bundles?// TODO escape the patterns (add leading trailing Q and E sequences...)buildContext.describeResources(crd -> crd.add(platformNormalisedResourcePattern));
}
});
}
}
}
This is interesting as it's not going to be straightforward to test every resource added through this method against every existing pattern that may or may not be a regex - that feels very CPU intensive. I might put up a PR with a simple regex check for now.
This is a relatively minor issue as far as I can tell. My resource-config.json generated by spring-aot contains both wildcarded directories, and the complete listing of the directory contents as well. Presumably only one is necessary.
Near the top:
Further down:
The text was updated successfully, but these errors were encountered: