mirror of
https://github.com/apache/struts.git
synced 2026-08-07 07:37:20 +00:00
WW-3834 adds missing @Inject annotations to enable OVal support for JPA
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1345102 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+4
-3
@@ -65,10 +65,11 @@ public class OValValidationInterceptor extends MethodFilterInterceptor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable OVal support fopr JPA
|
||||
* Enable OVal support for JPA
|
||||
*/
|
||||
public void setValidateJPAAnnotations(boolean validateJPAAnnotations) {
|
||||
this.validateJPAAnnotations = validateJPAAnnotations;
|
||||
@Inject(value = "struts.oval.validateJPAAnnotations")
|
||||
public void setValidateJPAAnnotations(String validateJPAAnnotations) {
|
||||
this.validateJPAAnnotations = Boolean.parseBoolean(validateJPAAnnotations);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,43 +22,47 @@
|
||||
*/
|
||||
-->
|
||||
<!DOCTYPE struts PUBLIC
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<bean type="org.apache.struts2.oval.interceptor.OValValidationManager" class="org.apache.struts2.oval.interceptor.DefaultOValValidationManager" />
|
||||
<constant name="struts.oval.validateJPAAnnotations" value="false" />
|
||||
|
||||
<package name="oval-default" extends="struts-default">
|
||||
<interceptors>
|
||||
<interceptor name="ovalValidation" class="org.apache.struts2.oval.interceptor.OValValidationInterceptor" />
|
||||
|
||||
<interceptor-stack name="ovalValidationStack">
|
||||
<interceptor-ref name="exception"/>
|
||||
<interceptor-ref name="alias"/>
|
||||
<interceptor-ref name="servletConfig"/>
|
||||
<interceptor-ref name="i18n"/>
|
||||
<interceptor-ref name="prepare"/>
|
||||
<interceptor-ref name="chain"/>
|
||||
<interceptor-ref name="debugging"/>
|
||||
<interceptor-ref name="profiling"/>
|
||||
<interceptor-ref name="scopedModelDriven"/>
|
||||
<interceptor-ref name="modelDriven"/>
|
||||
<interceptor-ref name="fileUpload"/>
|
||||
<interceptor-ref name="checkbox"/>
|
||||
<interceptor-ref name="staticParams"/>
|
||||
<interceptor-ref name="actionMappingParams"/>
|
||||
<interceptor-ref name="params">
|
||||
<param name="excludeParams">dojo\..*,^struts\..*</param>
|
||||
</interceptor-ref>
|
||||
<interceptor-ref name="conversionError"/>
|
||||
<interceptor-ref name="ovalValidation">
|
||||
<param name="excludeMethods">input,back,cancel,browse</param>
|
||||
</interceptor-ref>
|
||||
<interceptor-ref name="workflow">
|
||||
<param name="excludeMethods">input,back,cancel,browse</param>
|
||||
</interceptor-ref>
|
||||
</interceptor-stack>
|
||||
</interceptors>
|
||||
<bean type="org.apache.struts2.oval.interceptor.OValValidationManager"
|
||||
class="org.apache.struts2.oval.interceptor.DefaultOValValidationManager"/>
|
||||
|
||||
<constant name="struts.oval.validateJPAAnnotations" value="false"/>
|
||||
|
||||
<package name="oval-default" extends="struts-default">
|
||||
<interceptors>
|
||||
<interceptor name="ovalValidation" class="org.apache.struts2.oval.interceptor.OValValidationInterceptor"/>
|
||||
|
||||
<interceptor-stack name="ovalValidationStack">
|
||||
<interceptor-ref name="exception"/>
|
||||
<interceptor-ref name="alias"/>
|
||||
<interceptor-ref name="servletConfig"/>
|
||||
<interceptor-ref name="i18n"/>
|
||||
<interceptor-ref name="prepare"/>
|
||||
<interceptor-ref name="chain"/>
|
||||
<interceptor-ref name="debugging"/>
|
||||
<interceptor-ref name="profiling"/>
|
||||
<interceptor-ref name="scopedModelDriven"/>
|
||||
<interceptor-ref name="modelDriven"/>
|
||||
<interceptor-ref name="fileUpload"/>
|
||||
<interceptor-ref name="checkbox"/>
|
||||
<interceptor-ref name="staticParams"/>
|
||||
<interceptor-ref name="actionMappingParams"/>
|
||||
<interceptor-ref name="params">
|
||||
<param name="excludeParams">dojo\..*,^struts\..*</param>
|
||||
</interceptor-ref>
|
||||
<interceptor-ref name="conversionError"/>
|
||||
<interceptor-ref name="ovalValidation">
|
||||
<param name="excludeMethods">input,back,cancel,browse</param>
|
||||
</interceptor-ref>
|
||||
<interceptor-ref name="workflow">
|
||||
<param name="excludeMethods">input,back,cancel,browse</param>
|
||||
</interceptor-ref>
|
||||
</interceptor-stack>
|
||||
</interceptors>
|
||||
</package>
|
||||
|
||||
</struts>
|
||||
|
||||
Reference in New Issue
Block a user