[英]How to inject Google App Engine datastore with Guice?
I'm trying to inject Google App Engine's datastore via Guice into my service: 我正试图通过Guice将Google App Engine的数据存储注入我的服务中:
public class FooServiceImpl implements FooService {
private final DatastoreService datastoreService;
@Inject
public FooServiceImpl (DatastoreService datastoreService) {
this.datastoreService = datastoreService;
}
}
But when I try to run it, I get the following error: 但是当我尝试运行它时,我收到以下错误:
No implementation for com.google.appengine.api.datastore.DatastoreService was bound. 没有绑定com.google.appengine.api.datastore.DatastoreService的实现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.