
屎山纠正笔记
Javaの神
这个作者很懒,什么都没留下…
展开
-
【笔记】记录一下今天mongo的几个用法【批量添加】【定点更新】【批量删除】
目录批量添加批量删除指定字段更新 批量添加 mongotemplate.insert /** * 批量保存消息对象 * @param notification * @return */ @Override public List<Notification> sendNotificationList(List<Notification> notification) { return (List<Notification>) mongoTemplate.ins原创 2021-11-22 19:09:15 · 453 阅读 · 0 评论 -
一个关于继承和mongodb读写的笔记
本来不想记的,,,想想还是信不过自己的记性,还是记一下吧 场景: 一个基础超类:Person 两个对象继承这个超类:Diaomao,Fuerdie 两个对象有三条相同属性和一条不同属性 共用crud接口在mongo进行操作 Pojo: @Data public class Person { } @EqualsAndHashCode(callSuper = true) @Data @Document("person") public class Fuerdie extends Person {原创 2021-11-18 17:52:24 · 615 阅读 · 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 · 1717 阅读 · 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 · 1465 阅读 · 0 评论