添加mybatisplus分页插件配置
This commit is contained in:
parent
c08ff946fe
commit
62abc4af7e
|
@ -0,0 +1,21 @@
|
||||||
|
package com.alihealth.d2d.provtest.config;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MybatisPlus配置,当前只是分页配置
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class MybatisPlusConfig {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||||
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||||
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
||||||
|
return interceptor;
|
||||||
|
}
|
||||||
|
}
|
|
@ -46,7 +46,11 @@ public class EventProcessingServiceImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
handler.handleBase(xml, eventId);
|
try {
|
||||||
|
handler.handleBase(xml, eventId);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("数据处理异常{},对应的eventId是={}", e.getMessage(), eventId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue