improt.org.springframework.data.domain.sort包Criterialcritel=newCriterial();criterl.and("createTime").is(req.getCreateTime())Sortsort=Sort.by(sort.Diretion.DESC,mongod库对应属性)mongoTempalate.fin
分类:
数据库 时间:
2020-12-29 11:05:45
阅读次数:
0
spring boot全局捕获异常 制作人:全心全意 @ExceptionHandler:标识拦截异常 @ControllerAdvice:Controller的一个辅助类,最常用的就是作为全局异常处理的切面类 @ControllerAdvice可以指定扫描范围 @ControllerAdvice约 ...
分类:
编程语言 时间:
2020-12-29 11:02:27
阅读次数:
0
体系结构概述: @Bean 之前时候,在xml配置文件使用: <bean id="person" class="com.atguigu.bean.Person" scope="prototype" > <property name="age" value="${}"></property> <pro ...
分类:
编程语言 时间:
2020-12-28 12:01:10
阅读次数:
0
首先Spring Boot项目中都会如下启动类: @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application. ...
分类:
编程语言 时间:
2020-12-28 11:58:46
阅读次数:
0
spring源码有很多值得学习的地方,自己搭建了一套源码框架,方便跟踪和查看。对理解底层的结构有非常大的帮助。下面开始: step1 准备环境: 官方下载spring的源码:记得切换分支,我下的是5.1.x https://github.com/spring-projects/spring-fram ...
分类:
编程语言 时间:
2020-12-28 11:50:19
阅读次数:
0
名称与标识 id 使用了约束中的唯一约束。里面不能出现特殊字符的 name 没有使用约束中的唯一约束。里面可以出现特殊字符。 设置对象的生命周期方法 init-method Bean被初始化的时候执行的方法 destroy-method Bean被销毁的时候执行的方法(Bean是单例创建,工厂关闭) ...
分类:
编程语言 时间:
2020-12-28 11:33:21
阅读次数:
0
在对 Spring Batch 源代码进行编译的时候,提示仓库配置错误错误: org.gradle.api.resources.ResourceException: Could not get resource 'http://repo.spring.io/plugins-release/org/s ...
分类:
编程语言 时间:
2020-12-28 11:13:10
阅读次数:
0
Spring Boot + Layui + Spring Data JPA 实现前后端分离下简单增删改查分页操作 1.项目背景 自己搭着玩,写个小demo 2.项目构成 后端:Spring boot 2.3 JDK1.8 数据库:Spring Data JPA MySQL 5.7.31 前端: La ...
分类:
编程语言 时间:
2020-12-28 11:04:17
阅读次数:
0
spring: data: mongodb: database: test (自己创建的库) port: 3717 host: aliyun~.com username: username password: 123456 authentication-database: admin 这里有一个大坑 ...
分类:
数据库 时间:
2020-12-28 11:02:07
阅读次数:
0
从 GitHub 克隆一个项目下发出现了错误: error: unable to create file spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springfram ...