Hello,
With shindig sample, i can get profile of john.doe for example following this
link :
http://localhost:8080/social/rest/people/john.doe
But now, I want to use my own DB, so I created class spiGuiceOauth extends
class SocialApiGuiceModule
protected void configure() {
super.configure();
bind(PersonService.class).to(PersonServiceImpl.class);
bind(ActivityService.class).to(ActivityServiceImpl.class);
bind(AppDataService.class).to((Class<? extends AppDataService>)
AppDataServiceImpl.class);
bind(OAuthDataStore.class).to(OAuthDataStoreImpl.class);
}
@Override
protected Set<Object> getHandlers() {
ImmutableSet.Builder<Object> handlers = ImmutableSet.builder();
handlers.addAll(super.getHandlers());
handlers.add(SampleContainerHandler.class);
return handlers.build();
}
And change file web.xml
org.apache.shindig.common.PropertiesModule:
org.apache.shindig.gadgets.DefaultGuiceModule:
spi.guiceModule.spiGuiceOauth:
org.apache.shindig.gadgets.oauth.OAuthModule:
org.apache.shindig.common.cache.ehcache.EhCacheModule
I tried to get profile of one person in my db for example :
http://localhost:8080/social/rest/people/ncox
but I don't understand why I until needs class JsonDbOpensocialService :(; It
gave me this error:
No implementation for java.lang.String annotated with
@com.google.inject.name.Named(value=shindig.canonical.json.db) was bound.
while locating java.lang.String annotated with
@com.google.inject.name.Named(value=shindig.canonical.json.db)
for parameter 0 at
org.apache.shindig.social.sample.spi.JsonDbOpensocialService.<init>(JsonDbOpensocialService.java:121)
while locating org.apache.shindig.social.sample.spi.JsonDbOpensocialService
for parameter 0 at
org.apache.shindig.social.sample.service.SampleContainerHandler.<init>(SampleContainerHandler.java:47)
while locating org.apache.shindig.social.sample.service.SampleContainerHandler
Could you give me some explanations, pls?
Thank you very much
Best regards.