What is the syntax to add a bean in the spring application?



What is the syntax to add a bean in the spring application?..

Answer / Yatendra Kumar Nagar

The syntax to add a bean in Spring Application Context is as follows: <bean id="<bean-id>" class="<fully-qualified-class-name>" />. The bean can also be defined using XML namespace aliases or Java-based configuration.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Spring Framework Interview Questions

Is spring jdbctemplate thread safe?

1 Answers  


What is front controller in spring?

1 Answers  


What is the default autowire in spring?

1 Answers  


What is context how is it used?

1 Answers  


What is difference between @inject and @autowired?

1 Answers  


When singleton beans are created in spring?

1 Answers  


What are the advantages of dependency injection in spring?

1 Answers  


Why is lazy initialized?

1 Answers  


What do you mean by spring ioc container?

1 Answers  


Why do we need spring aop?

1 Answers  


What namedparameterjdbctemplate in spring?

1 Answers  


What do you mean by proxy in spring framework?

1 Answers  


Categories