- @Configuration
- @MapperScan(basePackages = {"com.somewhere.commons.impl.mapper"})
- public class MybatisPlusConfig {
- @Bean
- public MybatisPlusInterceptor mybatisPlusInterceptor() {
- MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
- interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.POSTGRE_SQL));
- interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
- return interceptor;
- }
- @PostConstruct
- public void changeObjectMapper() {
- // This will unify the date format with util methods
- JacksonTypeHandler.setObjectMapper(JacksonUtil.getObjectMapper());
- }
- }
【SpringBoot+MyBatis Plus对Map中Date格式转换的处理】
经验总结扩展阅读
- 求富有哲理的对联越多越好
- 治疗高血压有哪些偏方?
- 女娲是怎么来的
- 贴对联要男的贴好还是女的贴好
- vivoX70pro和苹果11区别对比_哪款更值得入手
- 小米10s和小米10拍照哪个好_小米10s和小米10拍照对比
- vivox70pro+和小米11Ultra那个好_详细对比
- 免疫力低下吃维c行吗
- 感冒对血压的影响大吗
- 苹果6splus如何设置归属地