0 votes
in Spring by

What happens if no matching bean is found for an @Autowired dependency by default?

a) Spring creates a new bean

b) The application runs but with null dependency

c) An exception is thrown

d) The property is left uninitialized

1 Answer

0 votes
by
c) An exception is thrown

Explanation:

If Spring can't resolve an @Autowired dependency and no explicit handling is set, it will throw a NoSuchBeanDefinitionException.
...