私のxmlには、異なる入力ポイント-refを持つ複数のsecurity:http
設定があります。私はこの設定をJavaの設定に変換しようとしています。複数のsecuriy http設定をxmlからjava設定に変換する
これは、WebSecurityConfigurerAdapter
を拡張する複数のサブクラスを使用して可能であることを読んでいます。
java configでこれらのエントリポイントをどのように設定すればよいですか?
フォローはXML設定です。 Javaクラスと
<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>
<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"/>
</security:http>