Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of a boilerplate bean factory
public class DomainConfiguration {
public RetrieveSanitaryGrades retrieveSanitaryGrades() {
return new RetrieveSanitaryGrades();
public SearchRestaurants restaurantsFinder(Restaurants restaurants,
OpeningHours openingHours,
RetrieveSanitaryGrades retrieveSanitaryGrades) {
return new RestaurantsFinder(restaurants, openingHours, retrieveSanitaryGrades);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment