Announcement Announcement Module
Collapse
No announcement yet.
Config data for the whole application Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Config data for the whole application

    Hi All

    I'll need to share some configuration data to be shared by my Spring application. Which is the best way to keep this data in the way that it could be accesible from controllers, web flow actions, etc ?

    Thanks in advance

    C

  • #2
    It depends on what requirements you have - you can use a database but that usually is good when you have a big amount of info so you can take advantage of quering. If you have a small configuration then you can place it inside a registry/singleton of some sort - a tranditional JNDI or a simple bean defined as singleton which can be injected or lookup through the application context.

    Comment


    • #3
      What do you want to do?

      1. inject that configuration data into multiple components?
      --> use placeholders
      2. read the configuration data that from those components at runtime?
      --> read previous post, it depends on the requirements

      Comment


      • #4
        Originally posted by rebornspirit
        What do you want to do?

        1. inject that configuration data into multiple components?
        --> use placeholders
        2. read the configuration data that from those components at runtime?
        --> read previous post, it depends on the requirements

        Thanks for both replys.

        IŽll like the first solution. What do you mean with placeholders ?


        C

        Comment


        • #5
          See the javadoc or/and the reference documentation for a description of what the class does.

          Comment

          Working...
          X