Home  >  Forum  >  Spring
Post New Query

How to Stop Default Eager Loading in Spring



Asked on August 22, 2014

Hi Frnds
I'm using spring annotations.I used <context:component-scan base-package=""/> in Spring config files for controller and services and dao classes which are marked with @Controller,@Service and @Respository.
when i started my tomcat server in eclipse,I found dat all objects are created with early loading,bt i don't want to create all object with early loading ,i want to do with lazy loading,

Can any one help plz?




Replied on August 25, 2014
lazy-init is the attribute of bean. The values of lazy-init can be true and false. If lazy-init is true, then that bean will be initialized when a request is made to bean.

Find the Link
http://www.concretepage.com/spring/example_lazy_init_spring 


Write Answer




©2019 concretepage.com | Privacy Policy | Contact Us