Spring Security http標籤的use-expressions="true"屬性

若是聲明爲true,那麼在access屬性要用hasRole()這樣寫:url

<intercept-url pattern="/secure/extreme/**" access="hasRole('ROLE_SUPERVISOR')"/>rem

若是聲明爲false(默認),那麼access直接就是

<intercept-url pattern="/secure/extreme/**" access="ROLE_USER"/>

相關文章
相關標籤/搜索