当前位置: 首页>>代码示例>>Java>>正文


Java ShiroAnnotationsModule类代码示例

本文整理汇总了Java中com.pampanet.sample.shiro.modules.ShiroAnnotationsModule的典型用法代码示例。如果您正苦于以下问题:Java ShiroAnnotationsModule类的具体用法?Java ShiroAnnotationsModule怎么用?Java ShiroAnnotationsModule使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ShiroAnnotationsModule类属于com.pampanet.sample.shiro.modules包,在下文中一共展示了ShiroAnnotationsModule类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configureServlets

import com.pampanet.sample.shiro.modules.ShiroAnnotationsModule; //导入依赖的package包/类
@Override
protected void configureServlets() {
	super.configureServlets();
	
	//get the bootstrapping Properties file
	install(new BootstrapPropertiesModule());
	
	//Initialize Persistence JPA Unit of Work if present
	//install(new MyUnitOfWorkModule());
	//Initialize Apache Shiro if present
	install(new BootstrapShiroModule(getServletContext()));
	//This allows Shiro AOP Annotations http://shiro.apache.org/java-authorization-guide.html
	install(new ShiroAnnotationsModule());
	
	Map<String, String> params = new HashMap<String, String>();
       params.put(PackagesResourceConfig.PROPERTY_PACKAGES, propertyPackages);
       //if you had a Persistence Service like JPA Unit of Work you would need to add this PersistFilter also.
       //filter("/*").through(PersistFilter.class);
       //if you had a ShiroWebModule installed above you would need to add this GuiceShiroFilter also.
       filter("/*").through(GuiceShiroFilter.class);
       serve("/rest/*").with(GuiceContainer.class, params);
       
}
 
开发者ID:pabiagioli,项目名称:shiro-guice-jersey-bootstrap,代码行数:24,代码来源:BootstrapServletModule.java

示例2: configureServlets

import com.pampanet.sample.shiro.modules.ShiroAnnotationsModule; //导入依赖的package包/类
@Override
protected void configureServlets() {
	super.configureServlets();
	log.info("Bootstrap Main Servlet");
	// get the bootstrapping Properties file
	install(new BootstrapPropertiesModule());
	// Initialize Persistence JPA Unit of Work if present
	// install(new MyUnitOfWorkModule());
	// Initialize Apache Shiro if present
	install(new BootstrapShiroModule(getServletContext()));
	//This allows Shiro AOP Annotations http://shiro.apache.org/java-authorization-guide.html
	install(new ShiroAnnotationsModule());
	//This Module will try to bind all the classes under .rest packages
	install(new BootstrapRestPackagesModule());
	filter("/*").through(GuiceShiroFilter.class);
	filter("/*").through(GuiceRestEasyFilterDispatcher.class);

}
 
开发者ID:pabiagioli,项目名称:shiro-guice-resteasy-webapp,代码行数:19,代码来源:BootstrapServletModule.java

示例3: getModules

import com.pampanet.sample.shiro.modules.ShiroAnnotationsModule; //导入依赖的package包/类
@Override
protected List<? extends Module> getModules(ServletContext context) {
	logger.entry(context);
	return Arrays.asList(new BootstrapPropertiesModule(), new RequestScopeModule(), new BootstrapShiroModule(context), new ShiroAnnotationsModule(),new BootstrapRestPackagesModule());
}
 
开发者ID:pabiagioli,项目名称:shiro-guice-async-webapp,代码行数:6,代码来源:GenericGuiceRestEasyContextListener.java


注:本文中的com.pampanet.sample.shiro.modules.ShiroAnnotationsModule类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。