Skip to content

Commit

Permalink
minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sangeeth committed Oct 14, 2012
1 parent a1ac711 commit 3dd5c3d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
33 changes: 16 additions & 17 deletions simple-rbac/src/main/webapp/WEB-INF/applicationContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,34 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">

<context:annotation-config />

<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager" />
<property name="loginUrl" value="/login" />
<property name="successUrl" value="/home/" />

<property name="filterChainDefinitions">
<value>
/home/** = authc
</value>
</property>
</bean>

<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor" />

<bean id="iniRealm" class="org.apache.shiro.realm.text.IniRealm">
<property name="resourcePath" value="classpath:/shiro.ini" />
</bean>

<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
<property name="realm" ref="iniRealm" />
</bean>

<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor" />

<bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" depends-on="lifecycleBeanPostProcessor" />

<bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
<property name="securityManager" ref="securityManager" />
</bean>

<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager" />
<property name="loginUrl" value="/login" />
<property name="successUrl" value="/home/" />

<property name="filterChainDefinitions">
<value>
/home/** = authc
</value>
</property>
</bean>

<bean id="protectedService" class="com.sangeethlabs.shiro.simplerbac.ProtectedService">
<bean id="protectedService" class="com.sangeethlabs.shiro.simplerbac.ProtectedService">
</bean>
</beans>
2 changes: 1 addition & 1 deletion simple-rbac/src/main/webapp/WEB-INF/jsp/home.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<form name="diff" method="post">
<input type="hidden" name="method" value="diff"/>
<input type="text" name="a" value="500" class="number"/>
+
-
<input type="text" name="b" value="300" class="number"/>
<input type="submit" value="=">
<input type="text" name="result" value="${diff}" readonly="readonly" class="number"/>
Expand Down

0 comments on commit 3dd5c3d

Please sign in to comment.