Results 1 to 3 of 3

Thread: How to set a Map in ApplicationContext with database Values

  1. #1
    Join Date
    Mar 2010
    Posts
    3

    Default How to set a Map in ApplicationContext with database Values

    Good morning, guys.

    I know how I can set a Map in ApplicationContext in an usual way (writing key-values pairs) but I need retrieve values of database and insert into a MAP in applicationContext. That's possible?.

    I mean:
    I have a Map property called provinceMap in my bean:

    Map provinceMap;

    I need to fill it with database values in ApplicattionContext.

  2. #2
    Join Date
    Nov 2008
    Location
    London,UK
    Posts
    299

    Default

    Isnt the logic very specific to your application ?

    Shouldn't spring be calling can Spring call a procedure and populating your bean ?

    [I remember doing something similar using Spring Batch +Spring Jdbc+ Spring Integration where the usecase was slightly different and I had to call JDBC procedure to get my job executed at regular intervals]

  3. #3
    Join Date
    Apr 2012
    Posts
    1

    Default

    Let me know if you find a solution? i am also need logic to set a map with data base values

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •