I want to override two portal-impl.jar classes NtlmFiler.java and NtlmPostFilter.java, I have created an ext-plugin project and placed my custom written classes in ext-impl/src but I am unable to configure my spring.xml file to use my newly written classes instead of portal-impl classes, maybe i am totally wrong about doing it this way.
My ext-spring.xml code is :
<?xml version="1.0" encoding="UTF-8"?>
<beans>
<bean id="com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter"
class="com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter">
<property name="ntlmFilter">
<bean class="com.sso.ntlm.filter.CustomNtlmFilter">
<property name="CustomNtlmFilter" ref="customNtlmFilter" />
</bean>
</property>
</bean>
<bean id="com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter"
class="com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter">
<property name="ntlmPostFilter">
<bean class="com.sso.ntlm.filter.CustomNtlmPostFilter">
<property name="CustomNtlmPostFilter" ref="customNtlmPostFilter" />
</bean>
</property>
</bean>
As the
NtlmFilter
is no Spring bean, there is no use to define it inext-spring.xml
.See
portal.properties
:So you just need to reference your filter class instead in
liferay-web.xml
orweb-ext.xml
(I don't know if the later works for overrides).The same applies to the
NtlmPostFilter
.