Hi Mike,

<bean id="securityManager" ...
    <property name="realms">
        <list>
            <bean ref="realm1"/>
            <bean ref="realm2"/>
            ...
        </list>
    </property>
</bean>

HTH,

--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282


On Fri, Jun 28, 2013 at 8:52 AM, Michael Chandler <
[email protected]> wrote:

>  Hi there!****
>
> ** **
>
> I’m trying to set multiple realms in my configuration via Spring and the
> docs show me how to set up a single realm configuration as follows:****
>
> ** **
>
> <bean id="myRealm" class="...">****
>
> <bean id="securityManager"
> class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">****
>
>                 <property name="realm" ref="myRealm" />****
>
> </bean>****
>
> ** **
>
> Can anyone tell me how to set up multiple realms?****
>
> ** **
>
> In the JavaDocs, I can see that Security Manager classes have a
> setRealms() method for a Collection of Realm objects in addition to the
> single setRealm() method, but I’m unsure of how to leverage that in the
> applicationContext XML config.  I’m sure this has more to do with my lack
> of experience with Spring than a problem with the documentation, by the way.
> ****
>
> ** **
>
> Any ideas?****
>
> ** **
>
> Regards,****
>
> ** **
>
> Mike Chandler****
>
> ** **
>

Reply via email to