Quick and dirty regex fix for validation. Allows regex in port and perio...

This will allow for simple property replacement such as:

graphite.periodInSeconds=60
graphite.host=localhost
graphite.port=2003
graphite.prefix=my.prefix


<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:metrics="http://www.ryantenney.com/schema/metrics"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="
            http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
            http://www.springframework.org/schema/util
            http://www.springframework.org/schema/util/spring-util.xsd
            http://www.ryantenney.com/schema/metrics
            http://www.ryantenney.com/schema/metrics/metrics-3.0.xsd">

    <!-- registry and reporters should be defined in only one context xml file -->
    <metrics:metric-registry id="metricsRegistry" name="springMetrics" />
    <util:properties id='springElHack'>
        <prop key="period">${graphite.periodInSeconds}s</prop>
        <prop key="enabled">${graphite.enabled}</prop>
    </util:properties>
    <metrics:reporter type="jmx" metric-registry="metricsRegistry" duration-unit="MILLISECONDS" rate-unit="SECONDS" mbean-server-ref="mbeanServer"/>
    <metrics:reporter type="graphite" metric-registry="metricsRegistry" period="${graphite.periodInSeconds}s" host="${graphite.host}" port="${graphite.port}" duration-unit="MILLISECONDS" rate-unit="SECONDS" prefix="${graphite.prefix}"/>

    <!-- annotation-driven must be included in all context files -->
    <metrics:annotation-driven metric-registry="metricsRegistry" />


</beans>