我想创建一个Spring bean(一个JMX监视器),它有一个方法setThresholds(Number highThreshold, Number lowThreshold)。
我能在配置中调用这个具有两个参数的方法吗?我不想编写代码来调用它。
<bean id="myMonitor" class="javax.management.monitor.GaugeMonitor" init-method="start">
<property name="observedObject">
<bean class="javax.management.ObjectName">
<constructor-arg value="test.jmx:name=testBean1" />
</bean>
</property>
<property name="observedAttribute" value="testProperty" />
<property name="granularityPeriod">
<bean class="java.lang.Float">
<constructor-arg value="1000" />
</bean>
</property>
</bean>