Does spring bean provide thread safety?



Does spring bean provide thread safety?..

Answer / Yamuna Kumar Nirala

By default, Spring Beans are not thread-safe. However, you can configure beans to be singleton (single instance per Spring container) to ensure thread safety. If a bean is marked as @Singleton, multiple threads will use the same instance, thus sharing state.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Spring Framework Interview Questions

Why do we use @override?

1 Answers  


Is spring boot better than spring? : Spring Boot

1 Answers  


What is init method in spring?

1 Answers  


What are the components in bean definition?

1 Answers  


What is pojo model?

1 Answers  


What are the types of the transaction management that is supported by spring?

1 Answers  


What is the current version of spring?

1 Answers  


What is @componentscan in spring?

1 Answers  


Can we learn spring boot without knowing spring? : Spring Boot

1 Answers  


Explain the different types of spring container?

1 Answers  


What is a spring framework?

1 Answers  


What is portlet context in spring?

1 Answers  


Categories