INT-1715 fixed poller schema definition to allow 'ref' attribute on inner-pollers definitions used in non-core schemas
This commit is contained in:
@@ -35,6 +35,7 @@ import org.springframework.scheduling.support.PeriodicTrigger;
|
||||
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
* @author Oleg Zhurakousky
|
||||
*/
|
||||
public class PollerParserTests {
|
||||
|
||||
@@ -111,4 +112,10 @@ public class PollerParserTests {
|
||||
new ClassPathXmlApplicationContext(
|
||||
"cronTriggerWithTimeUnit-fail.xml", PollerParserTests.class);
|
||||
}
|
||||
|
||||
@Test(expected=BeanDefinitionParsingException.class)
|
||||
public void topLevelPollerWithRef() {
|
||||
new ClassPathXmlApplicationContext(
|
||||
"defaultPollerWithRef.xml", PollerParserTests.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration
|
||||
http://www.springframework.org/schema/integration/spring-integration-2.0.xsd">
|
||||
|
||||
<poller id="defaultPollerWithId" default="true" fixed-rate="5000"/>
|
||||
|
||||
<poller id="defaultPollerWithRef" ref="defaultPollerWithId"/>
|
||||
|
||||
</beans:beans>
|
||||
Reference in New Issue
Block a user