Get all updates of Java4s
Newsletter

Spring Setter Injection, Dependency In The Form Of Collections

Spring »on Aug 8, 2011 { 15 Comments } By Sivateja

While creating spring bean (pojo class), the bean class can use any of the following 4 types of collections as dependency, along with some primitives and objects like previous sessions..

  • Set
  • List
  • Map
  • Properties

Spring supports these 4 collections only as the dependencies.

Except above 4 types of collections, if the spring bean class uses any other type of collection as dependency, then spring container doesn’t inject that collection object to the spring bean, in this case spring programmer is responsible for injection that collection object manually.

Let us see how to use one by one collection property with syntax

You Might Also Like

  ::. About the Author .::

Java4s_Author
- Full Stack Java/J2EE & UI Web Developer
Founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog, Love Java and UI frameworks.
You can sign-up for the Email Newsletter for your daily dose of Java tutorials.

Comments

15 Responses to “Spring Setter Injection, Dependency In The Form Of Collections”
  1. Vinod says:

    Hey, It is really a wonderful site. I have searching for very long time to read about Spring. I got it today. I have many many Thanks for you.

  2. haps says:

    Present am working on Spring mvc techonlogy , there is requirment for placing Captcha in my registration page which is better athuntication for user so how to do that [adding captcha in my Registration Page]. Please kindly help me

  3. Bibhuti Bhusan says:

    Thanks for this tutorial.this helped me a lot.

  4. sarath says:

    Good explanation
    thank you so much

  5. Babar says:

    Good Explaination…….
    spring only support these 4 types of collections???
    queue and stacks etc does not support???

  6. Waleed says:

    You are awesome kind of thing,,, :)

  7. soma says:

    You have done a wonderful job

  8. Jeseena says:

    Great explanation… More than expected.. Thanks a lot

  9. srikanth says:

    really usefull and good and clearly explanation in simple manner.
    Than You So much

  10. Giri Kanchukota says:

    Wonderful tutorial for beginners. Thanks a lot Shiva Teja.

  11. sidharth says:

    Please maintain Index so that we could approach the concepts easily

  12. Anup Sonkusare says:

    Very clearly explained..
    Much useful for beginners.

    You are doing good job,
    Thanks a lot sir!!

    Keep it up..

  13. Rajesh R says:

    Wonderful site created by great people, much appreciate you hard work.

  14. Pradip says:

    Very nice explanations… Thanks a lot !!!

  15. balu says:

    can u plz share about the @controller means….and overall work in springmvc in detailed

Name*
Mail*
Website



By posting your answer, you agree to our comments policy.
What would you like to learn today?
Browse these popular technologies
Spring-Boot-tutorials Hibernate tutorials Spring tutorials Struts tutorials Servlets tutorials Ajax tutorials Log4j tutorials jQuery tutorials Json tutorials Core Java tutorials Web Services tutorials AngularJs tutorials
Most Recent Tutorials
Hibernate_Logo Hibernate Recent Posts Spring_Logo Spring Recent Posts Struts_Logo Struts Recent Posts
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2018 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.