[jira] [Commented] (SHIRO-618) Spring Boot Web Starter- Autoconfiguration for Realm and ShiroFilterChainDefinition

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SHIRO-618) Spring Boot Web Starter- Autoconfiguration for Realm and ShiroFilterChainDefinition

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/SHIRO-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15941758#comment-15941758 ]

Marc G. commented on SHIRO-618:
-------------------------------

https://github.com/MarcGiffing/shiro/commit/fbbd83dc941b98dda6a747a93a1e23f675b14f0c

I don't find the place where I can configure the /** protection for the filter. I sadly havn't used shiro before.

Now you got the following exception in the log if you havn't configured a realm bean or configured a shiro.ini. You can provide a better message if you want.

{code:title=Startup Failure due to missing Realm bean|borderStyle=solid}
***************************
APPLICATION FAILED TO START
***************************

Description:

No bean of type 'org.apache.shiro.realm.Realm' found.

Action:

Please create bean of type realm or add a shiro.ini in the root classpath (src/main/resources/shiro.ini) or in the META-INF folder (src/main/resources/META-INF/shiro.ini) .
{code}

Why do we have two starters which configures the same thing? The web starter could use the other starter or am I wrong?


> Spring Boot Web Starter- Autoconfiguration for Realm and ShiroFilterChainDefinition
> -----------------------------------------------------------------------------------
>
>                 Key: SHIRO-618
>                 URL: https://issues.apache.org/jira/browse/SHIRO-618
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Marc G.
>
> After adding the spring-boot-web-starter you got the exception that two beans are missing.
> * Realm
> * ShiroFilterChainDefinition
> Are they not defined on purpose? Both can be provided as a default with @ConditionalOnMissingBean.
> A default TextConfigurationRealm could be configured with properties.
> Providing defaults makes it easier to get startet.
> I could provide a pull request if desired.
> What do you think?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)