spring boot 2.0 提示 No primary or default constructor found for interface Pageable 解决办法
在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());
}
spring boot 2.0 提示 No primary or default constructor found for interface Pageable 解决办法的更多相关文章
- SpringMVC开发中遇到的异常1:No primary or default constructor found for interface java.util.List
Request processing failed; nested exception is java.lang.IllegalStateException: No primary or defaul ...
- spring boot无法启动,或者正常启动之后无法访问报404的解决办法
以前用spring boot都是用idea的自动创建,或者是用的Jhipster创建的,就没有深究怎么去搭建.但是今天晚上心血来潮,想自己搭一个demo来整合一些技术,于是就花一点时间来手动搭.因为今 ...
- Spring Boot 2.0 版的开源项目云收藏来了!
给大家聊一聊云收藏从 Spring Boot 1.0 升级到 2.0 所踩的坑 先给大家晒一下云收藏的几个数据,作为一个 Spring Boot 的开源项目(https://github.com/cl ...
- spring boot 2.0 源码分析(三)
通过上一章的源码分析,我们知道了spring boot里面的listeners到底是什么(META-INF/spring.factories定义的资源的实例),以及它是创建和启动的,今天我们继续深入分 ...
- Spring Boot 2.0 的快速入门(图文教程)
摘要: 原创出处 https://www.bysocket.com 「公众号:泥瓦匠BYSocket 」欢迎关注和转载,保留摘要,谢谢! Spring Boot 2.0 的快速入门(图文教程) 大家都 ...
- 【SFA官方翻译】使用 Kubernetes、Spring Boot 2.0 和 Docker 的微服务快速指南
[SFA官方翻译]使用 Kubernetes.Spring Boot 2.0 和 Docker 的微服务快速指南 原创: Darren Luo SpringForAll社区 今天 原文链接:https ...
- Quick Guide to Microservices with Spring Boot 2.0, Eureka and Spring Cloud
https://piotrminkowski.wordpress.com/2018/04/26/quick-guide-to-microservices-with-spring-boot-2-0-eu ...
- 195. Spring Boot 2.0数据库迁移:Flyway
[视频&交流平台] àSpringBoot视频:http://t.cn/R3QepWG à SpringCloud视频:http://t.cn/R3QeRZc à Spring Boot源码: ...
- spring boot 2.0 源码分析(一)
在学习spring boot 2.0源码之前,我们先利用spring initializr快速地创建一个基本的简单的示例: 1.先从创建示例中的main函数开始读起: package com.exam ...
随机推荐
- Java并发之同步工具类
1. CountDownlatch(计数器) 描述: 一个同步工具类,允许一个或多个线程等待其它线程完成操作 类图 通过指定的count值进行初始化,调用await方法的线程将被阻塞,直到count值 ...
- pl/sql Developer连接oracle远程数据库
1.下载地址:PLSQL Developer 12.1正式版64位(含中文语言包.注册码).rar https://download.csdn.net/download/bokewangyu/11 ...
- 使用Xshell链接阿里云服务
1.下载Xshell,进入xshell官网 https://xshell.en.softonic.com/,选择免费版本进行下载,在该页面https://www.netsarang.com/zh/fr ...
- pdnovel 看书 读书 听书
pdnovel剖度小说是discuz的阅读插件,这里分享一下阅读的一些技巧. 看书 点击或手机输入 http://txt.xlongwei.com 即可进入阅读首页,内容分书book.卷volume. ...
- 线性dp,分层图思想
题目大意:给你一串数字,一串运算符,求递推用完运算符时答案的最大值----->线性dp dp[i][j] i表示所用数字的个数 j表示所用字符的个数 分层图思想 所有字符必须用完 所以取最后 ...
- 3.JSON使用
把 JSON 文本转换为 JavaScript 对象 JSON 最常见的用法之一,是从 web 服务器上读取 JSON 数据(作为文件或作为 HttpRequest),将 JSON 数据转换为 Jav ...
- easyUI之表单
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <hea ...
- MediaPlayer 播放视频的方法
MediaPlayer mediaPlayer = new MediaPlayer(); mediaPlayer.reset();//重置为初始状态 mediaPlayer.setAudioStrea ...
- 数据分析 - Excel 函数, 技巧, 分析工具
数据分析工具使用场景 函数 分类 文本清洗函数 FIND - 查找 find 函数查询指定位置的某字符的的位置 快捷键 : 选中后双击右下角的 + 可以快速生成当前一列结果 FIND("查询 ...
- PCL已有点类型介绍和增加自定义的点类型
博客转载自:http://www.pclcn.org/study/shownews.php?lang=cn&id=265 本小节不仅解释如何增加你自己的PointT点类型,也介绍了PCL中的模 ...