INT-1535: add auto-startup to schema, plus test
This commit is contained in:
@@ -57,6 +57,14 @@ public class JdbcPollingChannelAdapterParserTests {
|
||||
|
||||
private PlatformTransactionManager transactionManager;
|
||||
|
||||
@Test
|
||||
public void testNoAutoStartupInboundChannelAdapter() {
|
||||
setUp("pollingNoAutoStartupJdbcInboundChannelAdapterTest.xml", getClass());
|
||||
this.jdbcTemplate.update("insert into item values(1,'',2)");
|
||||
Message<?> message = messagingTemplate.receive();
|
||||
assertNull("Message found ", message);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSimpleInboundChannelAdapter() {
|
||||
setUp("pollingForMapJdbcInboundChannelAdapterTest.xml", getClass());
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration/jdbc"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration/jdbc
|
||||
http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd">
|
||||
|
||||
<inbound-channel-adapter id="jdbcAdapter" query="select * from item where status=2" channel="target"
|
||||
data-source="dataSource" auto-startup="#{systemProperties['autostart']?:false}"/>
|
||||
|
||||
<beans:import resource="jdbcInboundChannelAdapterCommonConfig.xml" />
|
||||
|
||||
</beans:beans>
|
||||
Reference in New Issue
Block a user