Spring3.1を使用してセクション レベルのセキュリティを実装しようとしています。ビュー部分にThymeleaf2.0を使用しています。これが私がそうするために行った構成です、
Jars Used## - すべてのspring3.1 jarおよびthymeleaf-extras-springsecurity3.jar (バージョン 1.0.0.beta-1)
SpringWebFlow-Servlet.xml
<bean id="templateEngine" class="org.thymeleaf.spring3.SpringTemplateEngine">
...
<property name="additionalDialects">
<set>
<bean class="org.thymeleaf.extras.springsecurity3.dialect.SpringSecurityDialect"/>
</set>
</property>
...
</bean>
<bean id="webexpressionHandler" class="org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler" />
spring-security.xml
<http auto-config="true" use-expressions="true">
<intercept-url pattern="/productSelection" access="hasRole('ROLE_ADMIN')"/>
.....
</http>
xxx.html
<div sec:authorize="hasRole('ROLE_ADMIN')">
This only be seen if authenticated user has role ROLE_ADMIN.
</div>
問題
次の例外を取得する: 可視の WebSecurityExpressionHandler インスタンスが applicationContext に見つかりませんでした
Spring3.1 では、DefaultWebSecurityExpressionHandler は WebSecurityExpressionHandler を実装せず、インターフェースは非推奨になりました。Thymeleaf が ApplicationContext で利用できない WebSecurityExpressionHandler のインスタンスを検索しようとしているため、回避策を教えてください。