pringboot多数据源配置(mysql,redis,mongodb)实战用SpringBootStarter提升效率虽然不同的starter实现起来各有差异,但是他们基本上都会使用到两个相同的内容:ConfigurationProperties和AutoConfiguration。因为SpringBoot坚信“约定大于配置”这一理念,所以我们使用ConfigurationProperties来
分类:
数据库 时间:
2020-12-04 11:11:32
阅读次数:
9
该系列文档是本人在学习 Mybatis 的源码过程中总结下来的,可能对读者不太友好,请结合我的源码注释(Mybatis源码分析 GitHub 地址、Mybatis-Spring 源码分析 GitHub 地址、Spring-Boot-Starter 源码分析 GitHub 地址)进行阅读 MyBati ...
分类:
数据库 时间:
2020-12-01 12:14:50
阅读次数:
12
该系列文档是本人在学习 Mybatis 的源码过程中总结下来的,可能对读者不太友好,请结合我的源码注释(Mybatis源码分析 GitHub 地址、Mybatis-Spring 源码分析 GitHub 地址、Spring-Boot-Starter 源码分析 GitHub 地址)进行阅读 MyBati ...
分类:
数据库 时间:
2020-11-30 15:34:38
阅读次数:
6
一、配置 1.添加依赖 在 springboot 启动器中直接添加依赖,或者创建后添加 Maven 依赖: <!--spring-boot-starter-data-redis--> <dependency> <groupId>org.springframework.boot</groupId> < ...
分类:
编程语言 时间:
2020-11-27 11:49:48
阅读次数:
20
@Temporal() 注解的使用 数据库的字段类型有date、time、datetime而Temporal注解的作用就是帮Java的Date类型进行格式化,一共有三种注解值: 第一种:@Temporal(TemporalType.DATE)——>实体类会封装成日期“yyyy-MM-dd”的 Dat ...
分类:
其他好文 时间:
2020-11-26 14:27:29
阅读次数:
3
该系列文档是本人在学习 Mybatis 的源码过程中总结下来的,可能对读者不太友好,请结合我的源码注释(Mybatis源码分析 GitHub 地址、Mybatis-Spring 源码分析 GitHub 地址、Spring-Boot-Starter 源码分析 GitHub 地址)进行阅读 MyBati ...
分类:
其他好文 时间:
2020-11-25 12:55:43
阅读次数:
5
1.引入依赖 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> <d ...
分类:
编程语言 时间:
2020-11-24 13:01:28
阅读次数:
18
1、pom 包配置 我们使用 Spring Boot 版本 2.1.0、jdk 1.8、tomcat 8.0。 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</a ...
分类:
编程语言 时间:
2020-11-24 12:18:53
阅读次数:
9
这一篇主要是用redis 做个简单的存储。把websocket传过来的消息存起来。 redis 依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redi ...
分类:
编程语言 时间:
2020-11-17 12:12:24
阅读次数:
7
SpringBoot 通过自定义注解实现切面编程 1、相关依赖包 <!-- aop 依赖包 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifa ...
分类:
编程语言 时间:
2020-11-12 13:21:35
阅读次数:
11