Announcement Announcement Module
Collapse
No announcement yet.
Passing String value coming from database Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing String value coming from database

    Hi Guys,

    Good day. I am new to Spring and its DI. Basically, I want to pass a value in appContext dynamically coming from my database.

    For example, in applicationContext:
    Code:
    <bean name="database" 
         class="examples.spring.Database">
         <property name="version">
              <value>[value from db]</value>
         </property>
    </bean>

    The [value from db] should fetch to the database. How do I do that? Or how can I call a method which return a String? Assume that I have set hibernate correctly.

    Thank you.
Working...
X