<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
<ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/>
<bean id="shiroRealm" class="com.liming.core.web.bootup.wicket.shiro.ShiroRealm"/>
<bean id="webSecurityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager"
destroy-method="destroy">
<property name="realm" ref="shiroRealm"/>
<property name="cacheManager" ref="shiroCacheManager" />
</bean>
<!-- 用户授权信息Cache, 采用EhCache -->
<bean id="shiroCacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager">
<!--<property name="cacheManager" ref="cacheManager"/>-->
<property name="cacheManagerConfigFile" value="$[karaf.base]/etc/ehcache.xml"/>
</bean>
<service interface="org.ops4j.pax.wicket.api.WebApplicationFactory">
<service-properties>
<entry key="pax.wicket.applicationname" value="blueprint.simple.default"/>
<entry key="pax.wicket.mountpoint" value="/"/>
</service-properties>
<bean class="com.liming.core.web.bootup.wicket.filter.ShiroWebApplicationFactory">
<property name="wicketApplication"
value="com.liming.core.web.bootup.wicket.IrisShiroApplication"/>
</bean>
</service>
<service interface="org.ops4j.pax.wicket.api.FilterFactory">
<service-properties>
<entry key="pax.wicket.applicationname" value="blueprint.simple.default"/>
<entry key="pax.wicket.filter.priority" value="2"/>
</service-properties>
<bean class="com.liming.core.web.bootup.wicket.filter.ShiroFilterFactory">
<property name="webSecurityManager" ref="webSecurityManager"/>
</bean>
</service>
</blueprint>
这里配置了ehcache,需要在karaf下的etc目录增加ehcache.xml文件。
pax wicket下的shiro集成
最新推荐文章于 2024-09-13 07:47:19 发布