首页>代码>spring boot整合freemaker开发医院管理系统>/hospital/src/main/java/com/gbq/hospital/config/listener/SpringEventListener.java
package com.gbq.hospital.config.listener; import org.apache.shiro.realm.AuthorizingRealm; import org.apache.shiro.web.mgt.DefaultWebSecurityManager; import org.springframework.context.ApplicationContext; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event.EventListener; import org.springframework.stereotype.Component; /** * 创建时间:2017年12月19日 下午3:21:26 * @author gbq * @version * */ @Component public class SpringEventListener { @EventListener public void handleContextRefresh(ContextRefreshedEvent event) { ApplicationContext context = event.getApplicationContext(); DefaultWebSecurityManager manager = (DefaultWebSecurityManager) context.getBean("securityManager"); AuthorizingRealm realm = (AuthorizingRealm) context.getBean("userRealm"); manager.setRealm(realm); } }
最近下载更多
FF加菲猫 LV4
2月15日
woshiwo LV3
1月17日
xuyang1991 LV2
2023年12月26日
adaddad LV2
2023年11月11日
skook7 LV2
2023年8月31日
LYLHYC LV5
2023年8月2日
五折也挺好的 LV13
2023年7月10日
泓鼎168 LV19
2023年6月30日
jlmarket LV22
2023年6月16日
mosstianke LV1
2023年5月10日
最近浏览更多
hmf1989
4月29日
暂无贡献等级
Gzp0822
4月12日
暂无贡献等级
chenglei1314 LV6
4月2日
提灯寻白鹿 LV2
3月27日
together love LV2
3月21日
阿桐吖 LV2
3月12日
Hopu2024 LV2
2月22日
FF加菲猫 LV4
2月15日
woshiwo LV3
1月17日
xk16675552250 LV33
1月4日