Skip to content

Instantly share code, notes, and snippets.

@gembin
Forked from jcarlosgarcia/gist:1621770
Created November 22, 2024 20:53
Show Gist options
  • Select an option

  • Save gembin/6b1ad9bfb8095edcb15af8446862c0a0 to your computer and use it in GitHub Desktop.

Select an option

Save gembin/6b1ad9bfb8095edcb15af8446862c0a0 to your computer and use it in GitHub Desktop.

Revisions

  1. @jcarlosgarcia jcarlosgarcia created this gist Jan 16, 2012.
    19 changes: 19 additions & 0 deletions gistfile1.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">

    <bean id="systemProps" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
    <property name="targetObject" value="#{@systemProperties}" />
    <property name="targetMethod" value="putAll" />
    <property name="arguments">
    <util:properties>
    <prop key="myprop1">myvalue1</prop>
    <prop key="myprop2">myvalue2</prop>
    <prop key="mypropN">myvalueN</prop>
    </util:properties>
    </property>
    </bean>
    </beans>