Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of a boilerplate bean factory
@Configuration
public class DomainConfiguration {
@Bean
public RetrieveSanitaryGrades retrieveSanitaryGrades() {
return new RetrieveSanitaryGrades();
}
@Bean
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
You can’t perform that action at this time.