1.springboot2.1版本以上 Sort已经不能用 new 实例化了
解决方案:
2.SpringBoot2中findOne废弃
3.
(1)检查postgre服务有没有启动,
(2) 端口是否被占用(是否防火墙阻止)
(3)IP是否发生改变
4.springBoot+mybatis+Postgresql
(1)可以参考:Spring boot+Mybatis+Postgresql框架搭建_springboot pg mybatis-优快云博客
主要解决mybatis中的坑:mybatis-generator-maven-plugin插件的一些坑-优快云博客
(2)启动mybatis自动生成实体类和xml
(3)
5.org.postgresql.util.PSQLException:致命错误:用户“post”Password认证失败
解决方案:D:\Program Files\PostgreSQL\13\data\pg_hba.conf
改成trust ,不用密码连接,然后连接上数据库修改密码:
ALTER USER postgres WITH PASSWORD
'postgres'
;
6.could not autowire no beans of xxxx type found
解决方案:
@Autowired(required = false)
7.实现分页查询: