Commit c305c13d authored by Quxl's avatar Quxl

修改SQLSERVER方言(分页查询用)

Change-Id: I01ce6c04bb93cc1d0e4e00b8b908cc236799d036
parent ebc2d876
...@@ -12,7 +12,7 @@ import org.springframework.transaction.PlatformTransactionManager; ...@@ -12,7 +12,7 @@ import org.springframework.transaction.PlatformTransactionManager;
import com.alibaba.druid.pool.DruidDataSource; import com.alibaba.druid.pool.DruidDataSource;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.dialect.MySqlDialect; import com.egolm.common.jdbc.dialect.SqlServerDialect;
@Configuration @Configuration
public class ShopDataSourceConfig { public class ShopDataSourceConfig {
...@@ -35,7 +35,7 @@ public class ShopDataSourceConfig { ...@@ -35,7 +35,7 @@ public class ShopDataSourceConfig {
public JdbcTemplate getJdbcTemplate(@Qualifier("shopDataSource")DataSource dataSource) { public JdbcTemplate getJdbcTemplate(@Qualifier("shopDataSource")DataSource dataSource) {
JdbcTemplate jdbcTemplate = new JdbcTemplate(); JdbcTemplate jdbcTemplate = new JdbcTemplate();
jdbcTemplate.setDataSource(dataSource); jdbcTemplate.setDataSource(dataSource);
jdbcTemplate.setDialect(new MySqlDialect()); jdbcTemplate.setDialect(new SqlServerDialect());
jdbcTemplate.setSql_level(3); jdbcTemplate.setSql_level(3);
return jdbcTemplate; return jdbcTemplate;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment