叽里呱啦实习周日

今日任务:完成删除,更新
错误1:
Mon Jun 04 00:53:48 CST 2018 WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification
解决方法:
jdbc:mysql://127.0.0.1:3306db_person后面加上
?useUnicode=true&characterEncoding=utf-8&useSSL=false
即jdbc:mysql://127.0.0.1:3306/db_personuseUnicode=true&characterEncoding=utf-8&useSSL=false

错误2:
使用postman的delete和put时出现
{
“timestamp”: 1570959957593,
“status”: 405,
“error”: “Method Not Allowed”,
“exception”: “org.springframework.web.HttpRequestMethodNotSupportedException”,
“message”: “Request method ‘DELETE’ not supported”,
“path”: “/springboot/person”
}
解决方法:
在url中加入/id:
如下:
http://localhost:8081/springboot/person?id=3&name=袁华&age=24
http://localhost:8081/springboot/person/3?id=3&name=袁华&age=24

了解到: JpaRepository继承自PagingAndSortingRepository接口,JpaRepository基于JPA的Repository接口,极大减少了JPA作为数据访问的代码,JpaRepository是实现Spring Data JPA技术访问数据库的关键接口。

完成任务:增删改查在postman上全部实现了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值