本文整理汇总了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();
}
示例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");
}
示例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");
}
示例4: get
import play.api.routing.Router; //导入依赖的package包/类
@Override
public play.api.routing.Router get() {
return routingDsl.build().asScala();
}
示例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;
}
示例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);
}
示例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);
}
示例8: withPrefix
import play.api.routing.Router; //导入依赖的package包/类
@Override
public Router withPrefix(String prefix) {
return router.withPrefix(prefix);
}
示例9: asJava
import play.api.routing.Router; //导入依赖的package包/类
@Override
public play.routing.Router asJava() {
return router.asJava();
}
示例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"));
}
示例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);
}