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


Java Router类代码示例

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


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

示例1: startApplicationTest

import play.api.routing.Router; //导入依赖的package包/类
@BeforeClass
public static void startApplicationTest() {
    // Mock the router binding.
    Binding<Router> routesBindingOverride = new BindingKey<>(Router.class)
            .toProvider(MockRouterProvider.class)
            .eagerly();

    application = new GuiceApplicationBuilder()
            .in(Mode.TEST)
            .configure("db.pushservices.name", "pushservices")
            .configure("db.pushservices.driver", "org.postgresql.Driver")
            .configure("db.pushservices.connectionTimeout", "10 seconds")
            .configure("db.pushservices.url", "jdbc:postgresql://localhost:5432/pushservices")
            .configure("db.pushservices.username", "YOUR_USERNAME")
            .configure("db.pushservices.password", "YOUR_PASSWORD")
            .overrides(routesBindingOverride)
            .build();
}
 
开发者ID:splendidbits,项目名称:play-pushservices,代码行数:19,代码来源:PushServicesApplicationTest.java

示例2: AbstractErrorHandler

import play.api.routing.Router; //导入依赖的package包/类
@Inject
public AbstractErrorHandler(Configuration configuration, Environment environment, OptionalSourceMapper optionalSourceMapper,
        Provider<Router> providerRouter) {
    super(configuration, environment, optionalSourceMapper, providerRouter);
    this.configuration = configuration;
    log.info("AbstractErrorHandler initialized");
}
 
开发者ID:theAgileFactory,项目名称:app-framework,代码行数:8,代码来源:AbstractErrorHandler.java

示例3: ErrorHandler

import play.api.routing.Router; //导入依赖的package包/类
@Inject
public ErrorHandler(JPAApi jpaApi, Configuration configuration, Environment environment, OptionalSourceMapper optionalSourceMapper, Provider<Router> provider, AccountManager accountManager, GroupManager groupManager,
        PostManager postManager, NotificationService notificationService) {
    super(configuration, environment, optionalSourceMapper, provider);
    this.configuration = configuration;
    this.jpaApi = jpaApi;
    this.accountManager = accountManager;
    this.groupManager = groupManager;
    this.postManager = postManager;
    this.notificationService = notificationService;

    this.MAX_FILESIZE = configuration.getInt("media.maxSize.file");
}
 
开发者ID:socia-platform,项目名称:htwplus,代码行数:14,代码来源:ErrorHandler.java

示例4: get

import play.api.routing.Router; //导入依赖的package包/类
@Override
public play.api.routing.Router get() {
    return routingDsl.build().asScala();
}
 
开发者ID:splendidbits,项目名称:play-pushservices,代码行数:5,代码来源:PushServicesApplicationTest.java

示例5: ErrorHandler

import play.api.routing.Router; //导入依赖的package包/类
@Inject
public ErrorHandler(Config config, Environment environment,
                    OptionalSourceMapper sourceMapper, Provider<Router> routes) {
    super(config, environment, sourceMapper, routes);
    this.config = config;
}
 
开发者ID:Azure,项目名称:device-telemetry-java,代码行数:7,代码来源:ErrorHandler.java

示例6: ErrorHandler

import play.api.routing.Router; //导入依赖的package包/类
@Inject
public ErrorHandler(Configuration configuration, Environment environment, OptionalSourceMapper sourceMapper, Provider<Router> routes) {
    super(configuration, environment, sourceMapper, routes);
}
 
开发者ID:cliffano,项目名称:swaggy-jenkins,代码行数:5,代码来源:ErrorHandler.java

示例7: ErrorHandler

import play.api.routing.Router; //导入依赖的package包/类
@Inject
public ErrorHandler(final Configuration configuration, final Environment environment,
                    final OptionalSourceMapper sourceMapper, final Provider<Router> routes) {
    super(configuration, environment, sourceMapper, routes);
}
 
开发者ID:commercetools,项目名称:commercetools-sunrise-java-training,代码行数:6,代码来源:ErrorHandler.java

示例8: withPrefix

import play.api.routing.Router; //导入依赖的package包/类
@Override
public Router withPrefix(String prefix) {
    return router.withPrefix(prefix);
}
 
开发者ID:lagom,项目名称:lagom-java-chirper-example,代码行数:5,代码来源:Routes.java

示例9: asJava

import play.api.routing.Router; //导入依赖的package包/类
@Override
public play.routing.Router asJava() {
    return router.asJava();
}
 
开发者ID:lagom,项目名称:lagom-java-chirper-example,代码行数:5,代码来源:Routes.java

示例10: SunriseDefaultHttpErrorHandler

import play.api.routing.Router; //导入依赖的package包/类
@Inject
public SunriseDefaultHttpErrorHandler(final Configuration configuration, final Environment environment, final OptionalSourceMapper sourceMapper, final Provider<Router> routes) {
    super(configuration, environment, sourceMapper, routes);
    this.playEditor = Option.apply(configuration.getString("play.editor"));
}
 
开发者ID:commercetools,项目名称:commercetools-sunrise-java,代码行数:6,代码来源:SunriseDefaultHttpErrorHandler.java

示例11: MafHttpErrorHandler

import play.api.routing.Router; //导入依赖的package包/类
/**
 * Default constructor.
 * 
 * @param configuration
 *            the Play configuration service
 * @param environment
 *            the Play environment service
 * @param optionalSourceMapper
 *            the Play optional source mapper
 * @param providerRouter
 *            the route provider
 */
@Inject
public MafHttpErrorHandler(Configuration configuration, Environment environment, OptionalSourceMapper optionalSourceMapper,
        Provider<Router> providerRouter) {
    super(configuration, environment, optionalSourceMapper, providerRouter);
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:18,代码来源:MafHttpErrorHandler.java


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