Get all updates of Java4s
Follow Us: Email Newsletter

Spring Setter Injection, Dependency In The Form Of Collections

Spring » On Aug 8, 2011 { 12 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 Author ♦

Java4s_Author
sivateja@java4s.com
Full Stack( Java/J2EE & UI/UX ) Developer and founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog. Sign-up for the Email Newsletter for your daily dose of Java tutorials.

Comments

12 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..

Name*
Mail*
Website



By posting your answer, you agree to our comments policy.
What would you like to learn today?
Browse these popular technologies
Hibernate spring struts Servlets ajax Log4j jQuery Json Core Java Web Services AngularJs
Most Recent Tutorials
Hibernate_Logo Hibernate Recent Posts Spring_Logo Spring Recent Posts Struts_Logo Struts Recent Posts
Useful Links Current & UpComing Tutorials
Upcoming
  Web Services [ SOAP ], JSP
Contact | About Us | Privacy Policy | Advertise With Us

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