Skip to content

Instantly share code, notes, and snippets.

@sveinung
Created February 15, 2013 08:17
Show Gist options
  • Save sveinung/4959110 to your computer and use it in GitHub Desktop.
Save sveinung/4959110 to your computer and use it in GitHub Desktop.
Eksempel på oppbygging av ein (banalt enkel) avhengigheitsgraf utan Spring IoC e.l.
public class MyApplication extends Application {
@Override
public Set<Object> getSingletons() {
HashSet<Object> objects = new HashSet<Object>();
objects.add(new ProductResource(new ProductRepository()));
return objects;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment