How will you handle the ambiguities of autowiring in Spring?

When autowiring using byType or constructor, it\'s possible that the container may find two or more beans whose type matches the property\'s type or the types of the constructor arguments. What will happen if there are  ambiguous beans suitable for autowiring?

Spring can\'t sort out ambiguities and chooses to throw an exception rather than guess which bean you meant to wire in. If you encounter such ambiguities when autowiring, the best solution is not to autowire the bean.

More interview questions and answers
Is there any function in winrunner which will clear the history of the browser?
WinRunner: How to read dynamic names of html_link
Is it possible to use winrunner for testing .aspx forms or dotnet forms?
Can WinRunner put the test results in a file?
WinRunner: What is the difference between virtual object and custom object?
How to create an Object of an Excel File in WinRunner?
How to use values returned by VB script in winrunner?
WinRunner: What tag is required to allow me to identify a html table?
WinRunner: How to work with file type using WinRunner functions?
WinRunner: Do Java Add-Ins required for Web based Application?
How to generate unique name?
WinRunner: How to access the last window brought up?
WinRunner: How to identifying dynamic objects in web applications ?
WinRunner: How to delete files from drive?
WinRunner: Could do we start automation before getting the build?
How to create a GUI map dynamically?
WinRunner script for Waitbusy?
Define : WinRunner script to get Min and Max?
Define : Type special chars in WinRuneer?
How to convert variable from ascii to string?
Define : The script for WinRunner Database Functions?
How to get time duration in millisecond in WinRunner?
Working with QTP and work on web application which is developed on .Net>
How to verify the animations(gif files) present in the applications using WinRunner?
WinRunner: Should I sign up for a course at a nearby educational institution?
How important is QTP in automated testing, does only with manaul testing (Test Director) is enough for testing. Or do we require automated tools in each and every projects. What are the different advantages of the QTP?
Tell me about the TestDirector?
What is a backward compatible design?
How to get the compiler to create a DLL ?
How to export DLL functions so that WinRunner could recognise them?
How to pass parameters between WinRunner and the DLL function?
Why Have TSL Test Code Conventions ?
Define : Test Script Naming ?
How can you reference a bean from another bean in Spring?
Define : Test script Directory structure: ?
All the TSL script files should begin with a comment that lists the Script name, Description of the script,
Define : Creating C DLLs for use with WinRunner?
How i Creating C++ DLLs for use with WinRunner?
Defien : Creating MFC DLLs for use with WinRunner?
Define: Creating MFC Dialog DLLs for use with WinRunner
Loading and Calling the Above DLLs from WinRunner
Definition of Tests ?
Test Recorder about Object Vs Actions ?
Test Recorder about Generic Test Environment Options ?
Test Recorder about Test Properties ?
What is inner bean in Spring fremawork?
What is the difference b/w fault and exception in Apache SOAP?
What is autowiring in the Spring framework? Explain its type?
How you define HTTP Binding in SOAP?
Tell me about what kinds of information included in SOAP header?
How will you handle the ambiguities of autowiring in Spring?
How will you wire a string value to a property whose type is a non-string?
What are the various custom editors provided by the Spring Framework?
Explain the Events and listener in Spring framework?
How to integrate your Struts application with Spring?
What are ORMís Spring supports ?
What is an Advice in Spring framework?
What is an Advisor API in Spring
What is throws advice in Spring?
Define a Pointcut in Spring?
Tell me how we use SOAP-DSIG and SSL for non-repudiation?
WHat do you mean by RSS?
Tell me why we use RSS?
Tell me history of RSS?
Give us RSS version which is much easier to understand?
How you define syntax of RSS?
Test Recorder about Script Environment
Test Recorder about Script Environment: Automation Inits ()
Test Recorder about Control Points
Test Recorder about Control Points - If. � Else:
Test Recorder about Data Access
Test Recorder about Control Points - Check Points
Test Recorder about Data Handlers
Online Vs Batch Execution - User Input . Where should the input_dialog_box function exist - in the driver file or in individual script?
Online Vs Batch Execution - Online Test Scripts How do we use Online Scripts?
Online Vs Batch Execution - TRe-Runnable Tests
Online Vs Batch Execution - TRe-Runnable Tests Calling a driver file from within a driver file? Is this advisable?
Online Vs Batch Execution - Functions & Compiled Modules-Load Library
Online Vs Batch Execution - Functions & Compiled Modules-Data Fetch Should we open and read from data table in driver scripts? Why or why not?
Online Vs Batch Execution - Functions & Compiled Modules - User Defined Functions Creating user-defined libraries and functions: How to access if a script should be made a function - What are the pros and cons of making a script a function versus just using it as a script and calling it from the driver file?
WinRunner: Test Director
WinRunner: Test Director - Test Repositories?
WinRunner: Test Director - Steps to take before creating Test Projects:
WinRunner: Test Director - Set Up Recommendations
WinRunner: Test Director - Documentation Standards:
WinRunner: Test Director - Naming Conventions:
WinRunner: Test Director - Set Up Recommendations:
WinRunner: Test Director - Importing WinRunner tests into Test Director
WinRunner: Test Director - How to delete Mercury Toolbar out of MS Word
WinRunner: Other Test Director Features
WinRunner: How to see the internal version of WebTest in your machine?
WinRunner: Web sites contain ActiveX controls
WinRunner: Web sites contain Java applets
WinRunner: Steps to take before recording:
WinRunner: Libraries Needed for automation:
WinRunner: Commands and Checkpoint Verification information for Web:
WinRunner: How to Structure tests for Web:
WinRunner: Recording tips:
WinRunner: Documentation:
WinRunner: Naming Conventions: