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


Java AnnotationConfigWebApplicationContext.scan方法代码示例

本文整理汇总了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();
        }
    };
}
 
开发者ID:opensingular,项目名称:singular-server,代码行数:22,代码来源:ModuleInitializer.java

示例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();
        }
    };
}
 
开发者ID:opensingular,项目名称:singular-server,代码行数:22,代码来源:SingleAppInitializer.java

示例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();
        }
    };
}
 
开发者ID:opensingular,项目名称:singular-server,代码行数:22,代码来源:ServerInitializer.java

示例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/*");

}
 
开发者ID:rusucosmin,项目名称:exampp,代码行数:11,代码来源:Initializer.java

示例5: SteveAppContext

import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; //导入方法依赖的package包/类
public SteveAppContext() {
    springContext = new AnnotationConfigWebApplicationContext();
    springContext.scan("de.rwth.idsg.steve.config");
}
 
开发者ID:RWTH-i5-IDSG,项目名称:steve-plugsurfing,代码行数:5,代码来源:SteveAppContext.java


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