简体   繁体   English

Spring集成-Microsoft SQL Server 2012的消息存储配置

[英]Spring Integration - Message Store configuration for Microsoft SQL Server 2012

I setup a MessageStore in Spring Integration using JDBC, following there's my configuration: 在完成配置后,我使用JDBC在Spring Integration中设置了MessageStore:

<bean id="queryProvider" class="org.springframework.integration.jdbc.store.channel.MySqlChannelMessageStoreQueryProvider" />

<!-- JDBC message store configuration -->
<bean id="store" class="org.springframework.integration.jdbc.store.JdbcChannelMessageStore">
    <property name="dataSource" ref="basicDataSource" />
    <property name="channelMessageStoreQueryProvider" ref="queryProvider" />
    <property name="region" value="TX_TIMEOUT" />
    <property name="usingIdCache" value="true" />
</bean>

My underlying DB is Microsoft SQL Server 2012 and when starting up the server I get the following exception: 我的基础数据库是Microsoft SQL Server 2012,启动服务器时出现以下异常:

nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'LIMIT'.
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:605)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:639)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:664)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:704)

How can I fix this problem? 我该如何解决这个问题?

The best way to implement SqlServerChannelMessageStoreQueryProvider and don't use MySqlChannelMessageStoreQueryProvider , because those RDBMS vendors use different DML. 最好的实现SqlServerChannelMessageStoreQueryProvider ,不要使用MySqlChannelMessageStoreQueryProvider ,因为那些RDBMS供应商使用不同的DML。

Feel free to raise a JIRA ticket and even contribute ! 随意举起JIRA门票甚至捐款

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 NetBeans + Microsoft SQL Server 2012 jbdc驱动程序 - NetBeans + Microsoft SQL Server 2012 jbdc drivers Spring与ActiveMQ集成以及带有消息存储支持的通道上的事务边界 - Transaction boundaries on Spring Integration with ActiveMQ and an a channel backed with an Message Store Spring Integration-带消息存储的队列-如何检查数据库中的持久消息 - Spring Integration - queue with message store - How to check persisted messages in the DB 维护配置了消息存储的通道的事务-Spring Integration - Maintaining Transaction for a Channel configured with Message Store - Spring Integration Spring集成路由器配置 - Spring integration router configuration Spring Integration的动态配置 - Dynamic configuration with Spring Integration 集成身份验证错误 Microsoft SQL Server 2017 和 Knime - Integration Authentication Error Microsoft SQL Server 2017 and Knime Spring Integration消息轮询 - Spring Integration message polling 为什么在默认的 Spring Cloud Stream 配置中更改了 Spring Integration 消息方法处理行为 - Why Spring Integration message method handling behavoiur is changed in default Spring Cloud Stream configuration 在集成测试中覆盖 spring @Configuration - Overriding spring @Configuration in an integration test
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM