Prevent unnecessary beans from being created.