![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
屎山纠正笔记
人形bug制造机9527
这个作者很懒,什么都没留下…
展开
-
【笔记】记录一下今天mongo的几个用法【批量添加】【定点更新】【批量删除】
目录批量添加批量删除指定字段更新批量添加mongotemplate.insert/** * 批量保存消息对象 * @param notification * @return */@Overridepublic List<Notification> sendNotificationList(List<Notification> notification) { return (List<Notification>) mongoTemplate.ins原创 2021-11-22 19:09:15 · 395 阅读 · 0 评论 -
一个关于继承和mongodb读写的笔记
本来不想记的,,,想想还是信不过自己的记性,还是记一下吧场景:一个基础超类:Person两个对象继承这个超类:Diaomao,Fuerdie两个对象有三条相同属性和一条不同属性共用crud接口在mongo进行操作Pojo:@Datapublic class Person {}@EqualsAndHashCode(callSuper = true)@Data@Document("person")public class Fuerdie extends Person {原创 2021-11-18 17:52:24 · 561 阅读 · 0 评论 -
记录一次mongodb错误
***************************APPLICATION FAILED TO START***************************Description:An attempt was made to call a method that does not exist. The attempt was made from the following location: org.springframework.boot.autoconfigure.mong.原创 2021-11-17 20:38:09 · 1538 阅读 · 2 评论 -
springboot如何统一响应格式以及统一异常处理呢,认识一下@RestControllerAdvice
ResponseBodyAdvice的作用:拦截Controller方法的返回值,统一处理返回值/响应体,一般用来统一返回格式,加解密,签名等等。看下ResponseBodyAdvice的源码:public interface ResponseBodyAdvice<T> { /** * 是否支持advice功能 * true 支持|false 不支持 */ boolean supports(MethodParameter var1, Class<? extend原创 2021-10-22 17:16:08 · 1372 阅读 · 0 评论