A {@code PermisisonResolver} resolves a string value and converts it into a
{@link hunt.shiro.authz.Permission Permission} instance.
<p/>
The default {@link WildcardPermissionResolver} should be
suitable for most purposes, which constructs {@link WildcardPermission} objects.
However, any resolver may be configured if an application wishes to use different
{@link hunt.shiro.authz.Permission} implementations.
<p/>
A {@code PermissionResolver} is used by many Shiro components such as annotations, property file
configuration, URL configuration, etc. It is useful whenever a string representation of a permission is specified
and that string needs to be converted to a Permission instance before executing a security check.
<p/>
Shiro chooses to support {@link WildcardPermission Wildcardpermission}s by default in almost all components and
we do that in the form of the {@link WildcardPermissionResolver WildcardPermissionResolver}. One of the nice
things about {@code WildcardPermission}s being supported by default is that it makes it very easy to
store complex permissions in the database - and also makes it very easy to represent permissions in JSP files,
annotations, etc., where a simple string representation is useful.
<p/>
Although this happens to be the Shiro default, you are of course free to provide custom
string-to-Permission conversion by providing Shiro components any instance of this interface.
A {@code PermisisonResolver} resolves a string value and converts it into a {@link hunt.shiro.authz.Permission Permission} instance. <p/> The default {@link WildcardPermissionResolver} should be suitable for most purposes, which constructs {@link WildcardPermission} objects. However, any resolver may be configured if an application wishes to use different {@link hunt.shiro.authz.Permission} implementations. <p/> A {@code PermissionResolver} is used by many Shiro components such as annotations, property file configuration, URL configuration, etc. It is useful whenever a string representation of a permission is specified and that string needs to be converted to a Permission instance before executing a security check. <p/> Shiro chooses to support {@link WildcardPermission Wildcardpermission}s by default in almost all components and we do that in the form of the {@link WildcardPermissionResolver WildcardPermissionResolver}. One of the nice things about {@code WildcardPermission}s being supported by default is that it makes it very easy to store complex permissions in the database - and also makes it very easy to represent permissions in JSP files, annotations, etc., where a simple string representation is useful. <p/> Although this happens to be the Shiro default, you are of course free to provide custom string-to-Permission conversion by providing Shiro components any instance of this interface.
@see hunt.shiro.authz.ModularRealmAuthorizer#setPermissionResolver(PermissionResolver) ModularRealmAuthorizer.setPermissionResolver @see hunt.shiro.realm.AuthorizingRealm#setPermissionResolver(PermissionResolver) AuthorizingRealm.setPermissionResolver @see PermissionResolverAware PermissionResolverAware