Ganesh Ganesh - 1 year ago 97
Java Question

Convert multiple securiy http configuration from xml to java configuration

I have multiple

configurations in my xml with different entry-point-ref. I am trying to convert this config to java config.

I have read that this is possible using multiple sub classes extending

How should I configure the entry-point-ref for each of these in java config?

follwing is the xml config.

<security:http request-matcher-ref="preReqMatcher" auto-config="false" use-expressions="false" entry-point- ref="preAuthenticatedProcessingFilterEntryPoint">
<custom-filter position="PRE_AUTH_FILTER" ref="preAuthFilter" />
<custom-filter after="CAS_FILTER" ref="attrFilter" />
<intercept-url pattern="/**" access="ROLE_USER" />
<csrf disabled="true"/>

<security:http auto-config="true" entry-point-ref="casEntryPoint" use-expressions="false" disable-url-rewriting="false">
<custom-filter position="CAS_FILTER" ref="casFilter" />
<custom-filter after="CAS_FILTER" ref="attrFilter" />
<intercept-url pattern="/**" access="ROLE_USER" />
<custom-filter ref="testFilter" before="CAS_FILTER" />
<csrf disabled="true"/>

Answer Source

Following is the way I figured out to configure the entry-point.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download