You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2026/07/01 10:19:08 UTC
(struts) 07/12: WW-5640 feat: register WebJarUrlProvider bean
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch WW-5640-webjars-support
in repository https://gitbox.apache.org/repos/asf/struts.git
commit 4f776553745686e7ed7cf9636da06ad0ee59ecb2
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Wed Jul 1 11:28:05 2026 +0200
WW-5640 feat: register WebJarUrlProvider bean
Co-Authored-By: Claude Opus 4.8 <no...@anthropic.com>
---
.../java/org/apache/struts2/config/StrutsBeanSelectionProvider.java | 2 ++
core/src/main/resources/struts-beans.xml | 2 ++
2 files changed, 4 insertions(+)
diff --git a/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java b/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java
index e3f632eda..f37cb4752 100644
--- a/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java
+++ b/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java
@@ -84,6 +84,7 @@ import org.apache.struts2.util.reflection.ReflectionProvider;
import org.apache.struts2.validator.ActionValidatorManager;
import org.apache.struts2.views.freemarker.FreemarkerManager;
import org.apache.struts2.views.util.UrlHelper;
+import org.apache.struts2.webjars.WebJarUrlProvider;
/**
* Selects the implementations of key framework extension points, using the loaded
@@ -430,6 +431,7 @@ public class StrutsBeanSelectionProvider extends AbstractBeanSelectionProvider {
alias(PatternMatcher.class, StrutsConstants.STRUTS_PATTERNMATCHER, builder, props);
alias(ContentTypeMatcher.class, StrutsConstants.STRUTS_CONTENT_TYPE_MATCHER, builder, props);
alias(StaticContentLoader.class, StrutsConstants.STRUTS_STATIC_CONTENT_LOADER, builder, props);
+ alias(WebJarUrlProvider.class, StrutsConstants.STRUTS_WEBJARS_URL_PROVIDER, builder, props);
alias(UnknownHandlerManager.class, StrutsConstants.STRUTS_UNKNOWN_HANDLER_MANAGER, builder, props);
alias(UrlHelper.class, StrutsConstants.STRUTS_URL_HELPER, builder, props);
diff --git a/core/src/main/resources/struts-beans.xml b/core/src/main/resources/struts-beans.xml
index 21c4ec7e6..90912b84e 100644
--- a/core/src/main/resources/struts-beans.xml
+++ b/core/src/main/resources/struts-beans.xml
@@ -207,6 +207,8 @@
<bean type="org.apache.struts2.dispatcher.StaticContentLoader"
class="org.apache.struts2.dispatcher.DefaultStaticContentLoader" name="struts"/>
+ <bean type="org.apache.struts2.webjars.WebJarUrlProvider"
+ class="org.apache.struts2.webjars.DefaultWebJarUrlProvider" name="struts"/>
<bean type="org.apache.struts2.UnknownHandlerManager"
class="org.apache.struts2.DefaultUnknownHandlerManager" name="struts"/>