Constructor Injection, Setter Injection, Field Injection
By creating objects in main class
Trough serialization
Which is the best way of injecting beans?
Setter Injection
Constructor Injection
Field Injection
What is a Spring Bean?
Static fields
Local classes
Java Objects that are initialized by the Spring IoC container
What is the default bean scope in Spring framework?
Prototype
Singleton
Session
How to define the scope of a bean?
With @scope annotation
With @sigleton annotation
With @session annotation
Are singleton beans thread-safe?
Yes
No
Can we have multiple Spring configuration files in one project?
Yes
No
What annotation is used for injecting dependency?
@Service
@Autowired
@Value
What annotation is used for persistence layer?
@Controller
@Repository
@Component
{"name":"Spring for Beginners", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What is spring framework?, How can we inject beans in Spring?, Which is the best way of injecting beans?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}