You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Dishant Anand <di...@techblue.co.uk> on 2015/04/13 12:34:12 UTC

ini versus spring based configurations

Hi Team,

I was going to integrate shiro into our company's enterprise project . 
On the documentation , I can see there are two ways to do the 
integration firstly using the simple shiro.ini file and through the 
shiro spring integration .

On stack overflow and various other forums people were discussing around 
these two technique's and I was bit confused as to which kind of 
integration to be followed in my application .

Should i use the simple *ini file *based approach or should i go with 
spring based integration . we have configured our project to use CDI and 
spring .

Can somebody please help me on this.

Thanks and Regards,
Dishant Anand

Re: ini versus spring based configurations

Posted by Christian Wolfe <ta...@gmail.com>.
I started off using the shiro.ini file, but nowadays I tend to use Spring.
When I do, I keep all of my Shiro configuration in a single Spring XML
file, so it's easy to find.

I'd say you should stick with shiro.ini until (or unless) you can't
anymore. That is to say, if you write a custom Shiro Realm, and find
yourself needing to inject some helper beans into it, then the Spring
config will probably be easier in the long run. If instead you end up
relying entirely on Shiro's out-of-the-box classes, then the INI file is
probably going to be good enough.

I will also say that I think the example Spring config from Shiro's website
does a pretty good job at showing how most of the stuff in shiro.ini
translates into Spring XML.

On Wed, Apr 22, 2015 at 9:30 AM, Brian Demers <br...@gmail.com>
wrote:

> I'd suggest starting with the shiro.ini file until you need something else
> ( IOC in a custom Shiro class, etc )
>
> On Wed, Apr 22, 2015 at 4:07 AM, Sashika <sa...@gmail.com> wrote:
>
>> I prefer the spring based configuration as all config then be in one
>> place. If i need to find a configuration issue i have to look only one
>> place rather than maintaining multiple config files. Also we can use place
>> holders for properties where values might come from database. If you are
>> comfortable with Spring then using the spring config is very good.
>> On Apr 13, 2015 8:08 PM, "Lenny Primak" <lp...@hope.nyc.ny.us> wrote:
>>
>>> I would use shiro.ini.
>>> It's simper, and when trying to figure out what's wrong, there is only
>>> one place to go (shiro.ini)
>>> instead of figuring out how to go through Spring etc.
>>>
>>> On Apr 13, 2015, at 6:34 AM, Dishant Anand wrote:
>>>
>>>  Hi Team,
>>>
>>> I was going to integrate shiro into our company's enterprise project .
>>> On the documentation , I can see there are two ways to do the integration
>>> firstly using the simple shiro.ini file and through the shiro spring
>>> integration .
>>>
>>> On stack overflow and various other forums people were discussing around
>>> these two technique's and I was bit confused as to which kind of
>>> integration to be followed in my application .
>>>
>>> Should i use the simple *ini file *based approach or should i go with
>>> spring based integration . we have configured our project to use CDI and
>>> spring .
>>>
>>> Can somebody please help me on this.
>>>
>>> Thanks and Regards,
>>> Dishant Anand
>>>
>>>
>>>
>

Re: ini versus spring based configurations

Posted by Brian Demers <br...@gmail.com>.
I'd suggest starting with the shiro.ini file until you need something else
( IOC in a custom Shiro class, etc )

On Wed, Apr 22, 2015 at 4:07 AM, Sashika <sa...@gmail.com> wrote:

> I prefer the spring based configuration as all config then be in one
> place. If i need to find a configuration issue i have to look only one
> place rather than maintaining multiple config files. Also we can use place
> holders for properties where values might come from database. If you are
> comfortable with Spring then using the spring config is very good.
> On Apr 13, 2015 8:08 PM, "Lenny Primak" <lp...@hope.nyc.ny.us> wrote:
>
>> I would use shiro.ini.
>> It's simper, and when trying to figure out what's wrong, there is only
>> one place to go (shiro.ini)
>> instead of figuring out how to go through Spring etc.
>>
>> On Apr 13, 2015, at 6:34 AM, Dishant Anand wrote:
>>
>>  Hi Team,
>>
>> I was going to integrate shiro into our company's enterprise project . On
>> the documentation , I can see there are two ways to do the integration
>> firstly using the simple shiro.ini file and through the shiro spring
>> integration .
>>
>> On stack overflow and various other forums people were discussing around
>> these two technique's and I was bit confused as to which kind of
>> integration to be followed in my application .
>>
>> Should i use the simple *ini file *based approach or should i go with
>> spring based integration . we have configured our project to use CDI and
>> spring .
>>
>> Can somebody please help me on this.
>>
>> Thanks and Regards,
>> Dishant Anand
>>
>>
>>

Re: ini versus spring based configurations

Posted by Sashika <sa...@gmail.com>.
I prefer the spring based configuration as all config then be in one place.
If i need to find a configuration issue i have to look only one place
rather than maintaining multiple config files. Also we can use place
holders for properties where values might come from database. If you are
comfortable with Spring then using the spring config is very good.
On Apr 13, 2015 8:08 PM, "Lenny Primak" <lp...@hope.nyc.ny.us> wrote:

> I would use shiro.ini.
> It's simper, and when trying to figure out what's wrong, there is only one
> place to go (shiro.ini)
> instead of figuring out how to go through Spring etc.
>
> On Apr 13, 2015, at 6:34 AM, Dishant Anand wrote:
>
>  Hi Team,
>
> I was going to integrate shiro into our company's enterprise project . On
> the documentation , I can see there are two ways to do the integration
> firstly using the simple shiro.ini file and through the shiro spring
> integration .
>
> On stack overflow and various other forums people were discussing around
> these two technique's and I was bit confused as to which kind of
> integration to be followed in my application .
>
> Should i use the simple *ini file *based approach or should i go with
> spring based integration . we have configured our project to use CDI and
> spring .
>
> Can somebody please help me on this.
>
> Thanks and Regards,
> Dishant Anand
>
>
>

Re: ini versus spring based configurations

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
I would use shiro.ini.
It's simper, and when trying to figure out what's wrong, there is only one place to go (shiro.ini)
instead of figuring out how to go through Spring etc.

On Apr 13, 2015, at 6:34 AM, Dishant Anand wrote:

> Hi Team,
> 
> I was going to integrate shiro into our company's enterprise project . On the documentation , I can see there are two ways to do the integration firstly using the simple shiro.ini file and through the shiro spring integration . 
> 
> On stack overflow and various other forums people were discussing around these two technique's and I was bit confused as to which kind of integration to be followed in my application .
> 
> Should i use the simple ini file based approach or should i go with spring based integration . we have configured our project to use CDI and spring .
> 
> Can somebody please help me on this.
> 
> Thanks and Regards,
> Dishant Anand