本文整理汇总了Java中org.springframework.web.context.support.AnnotationConfigWebApplicationContext.scan方法的典型用法代码示例。如果您正苦于以下问题:Java AnnotationConfigWebApplicationContext.scan方法的具体用法?Java AnnotationConfigWebApplicationContext.scan怎么用?Java AnnotationConfigWebApplicationContext.scan使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.web.context.support.AnnotationConfigWebApplicationContext
的用法示例。
在下文中一共展示了AnnotationConfigWebApplicationContext.scan方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: springHibernateConfiguration
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; //导入方法依赖的package包/类
@Override
public SpringHibernateInitializer springHibernateConfiguration() {
return new SpringHibernateInitializer() {
@Override
protected AnnotationConfigWebApplicationContext newApplicationContext() {
AnnotationConfigWebApplicationContext context = super.newApplicationContext();
context.scan(ModuleInitializer.this.springPackagesToScan());
return context;
}
@Override
protected Class<? extends SingularDefaultPersistenceConfiguration> persistenceConfiguration() {
return ModuleInitializer.this.persistenceConfiguration();
}
@Override
protected Class<? extends SingularDefaultBeanFactory> beanFactory() {
return ModuleInitializer.this.beanFactory();
}
};
}
示例2: springHibernateConfiguration
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; //导入方法依赖的package包/类
@Override
default SpringHibernateInitializer springHibernateConfiguration() {
return new SpringHibernateInitializer() {
@Override
protected AnnotationConfigWebApplicationContext newApplicationContext() {
AnnotationConfigWebApplicationContext context = super.newApplicationContext();
context.scan(SingleAppInitializer.this.springPackagesToScan());
return context;
}
@Override
protected Class<? extends SingularDefaultPersistenceConfiguration> persistenceConfiguration() {
return SingleAppInitializer.this.persistenceConfiguration();
}
@Override
protected Class<? extends SingularDefaultBeanFactory> beanFactory() {
return SingleAppInitializer.this.beanFactory();
}
};
}
示例3: springHibernateConfiguration
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; //导入方法依赖的package包/类
@Override
public SpringHibernateInitializer springHibernateConfiguration() {
return new SpringHibernateInitializer() {
@Override
protected AnnotationConfigWebApplicationContext newApplicationContext() {
AnnotationConfigWebApplicationContext context = super.newApplicationContext();
context.scan(ServerInitializer.this.springPackagesToScan());
return context;
}
@Override
protected Class<? extends SingularDefaultPersistenceConfiguration> persistenceConfiguration() {
return ServerInitializer.this.persistenceConfiguration();
}
@Override
protected Class<? extends SingularDefaultBeanFactory> beanFactory() {
return ServerInitializer.this.beanFactory();
}
};
}
示例4: onStartup
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; //导入方法依赖的package包/类
public void onStartup(ServletContext container)
throws ServletException {
AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();
context.scan("ro.dutylabs.mpp.web.config");
ServletRegistration.Dynamic dispatcher = container.addServlet("dispatcher", new DispatcherServlet(context));
dispatcher.setLoadOnStartup(1);
dispatcher.addMapping("/api/*");
}
示例5: SteveAppContext
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; //导入方法依赖的package包/类
public SteveAppContext() {
springContext = new AnnotationConfigWebApplicationContext();
springContext.scan("de.rwth.idsg.steve.config");
}