在SpringBoot 2.0 以前,我们会配置以下类

@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter 可见方法已经过期,SpringBoot 2.0 建议继承此配置类
@Configuration
public class WebMvcConfig extends WebMvcConfigurationSupport { 然后你会发现Controller中无法注入Pageable了,错误提示如下
No primary or default constructor found for interface org.springframework.data.domain.Pageable

@Override
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
// 注册Spring data jpa pageable的参数分解器
argumentResolvers.add(new PageableHandlerMethodArgumentResolver());
}

最新文章

  1. OpenGL学习进程(13)第十课:基本图形的底层实现及算法原理
  2. windows下运行的linux服务器批量管理工具(带UI界面)
  3. Node.js的学习--使用cheerio抓取网页数据
  4. 让css初学者抓狂的属性float
  5. android的jni
  6. Codeforces Round #333 (Div. 1) C. Kleof&#225;š and the n-thlon 树状数组优化dp
  7. [Linux]root默认密码问题
  8. 解决 子进程已安装的 post-removal脚本返回了错误号 100 的方法
  9. delphi客户端调服务器端的java webservice如何在参数中传对象? 转
  10. Redis 学习之事务处理
  11. require和import区别
  12. css预编译语言sass——mixin的使用
  13. luogu P2331 [SCOI2005]最大子矩阵
  14. 微信UnionId 部分开放
  15. noip2017d2t2
  16. JQuery快速入门-选择器
  17. leetCode题解之Array Partition I
  18. 读 Zepto 源码系列
  19. C#-WebForm-★★★JQuery知识——基础知识、选择器、事件★★★
  20. Python中的一些函数

热门文章

  1. BOM:浏览器对象
  2. 2.RabbitMq-持久化
  3. python 找出数组重复的元素
  4. springmvc源码解读(简介)
  5. Leetcode题目94.二叉树的中序遍历(中等)
  6. iOS (APP)进程间8中常用通信方式总结
  7. python操作Elasticsearch (一、例子)
  8. linux如何绑定域名和ip?
  9. &lt;javaScript&gt;谈谈JavaScript中的变量、指针和引用
  10. Linux shell利用sed如何批量更改文件名详解[转载]