摘要: 菜鸟教程 http://www.runoob.com/redis/redis-intro.html 一、Redis 是完全开源免费的,是一个高性能的key-value数据库。 二、Redis 的优点 1.相比其他key-value数据库,Redis支持数据持久化 2.相比其他key-value数据库 阅读全文
posted @ 2018-09-12 15:58 ForgotTheMemory 阅读(102) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2018-09-12 15:58 ForgotTheMemory 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-09-12 11:28 ForgotTheMemory 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 1.1.1. 启动错误1 关键错误(丢失了web容器的工厂,也就是说我们并没有把它作为一个web应用来启动): org.springframework.context.ApplicationContextException: Unable to start embedded container; n 阅读全文
posted @ 2018-09-12 11:15 ForgotTheMemory 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 设置RabbitMQ和Spring的整合 我们之前使用的Spring-Rabbit的xml方式,现在我们要改造成java方式,并且Spring Boot对RabbitMQ的使用做了自动配置,更加的简化了我们的使用。 1、 在导入spring-boot-starter-amqp的依赖; 2、 在app 阅读全文
posted @ 2018-09-12 11:09 ForgotTheMemory 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 设置Redis和Spring的整合 在Spring Boot中提供了RedisTempplate的操作,我们暂时不做学习,先按照我们之前的实现来完成。 代码: import java.util.ArrayList; import java.util.List; import org.springfr 阅读全文
posted @ 2018-09-12 11:07 ForgotTheMemory 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 设置Httpclient和Spring的整合 import org.apache.http.client.config.RequestConfig; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.h 阅读全文
posted @ 2018-09-12 11:07 ForgotTheMemory 阅读(2847) 评论(0) 推荐(0) 编辑
摘要: Mybatis和Spring Boot的整合有两种方式: 第一种:使用mybatis官方提供的Spring Boot整合包实现,地址:https://github.com/mybatis/spring-boot-starter 第二种:使用mybatis-spring整合的方式,也就是我们传统的方式 阅读全文
posted @ 2018-09-12 11:05 ForgotTheMemory 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 设置事务管理 在Spring Boot中推荐使用@Transactional注解来申明事务。 首先需要导入依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc 阅读全文
posted @ 2018-09-12 11:05 ForgotTheMemory 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1. Spring Boot 1.1. 什么是Spring Boot 1.2. Spring Boot的优缺点 1.3. 快速入门 1.3.1. 设置spring boot的parent <parent> <groupId>org.springframework.boot</groupId> <ar 阅读全文
posted @ 2018-09-12 10:56 ForgotTheMemory 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 1. Spring的发展 1.1. Spring1.x 时代 在Spring1.x时代,都是通过xml文件配置bean,随着项目的不断扩大,需要将xml配置分放到不同的配置文件中,需要频繁的在java类和xml配置文件中切换。 1.2. Spring2.x时代 随着JDK 1.5带来的注解支持,Sp 阅读全文
posted @ 2018-09-12 10:31 ForgotTheMemory 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1.单元测试中 @Test 执行 过程 ① 执行之前,先进行判断springXmlpath 即spring加载路径是否存在(见图一) (1) ② 如何判断spring的加载路径是否存在?其实是通过构造器传入(见图二),在子类中构造器调用super方法传入文件位置 (见图三),然后在 @Before 阅读全文
posted @ 2018-09-12 10:13 ForgotTheMemory 阅读(107) 评论(0) 推荐(0) 编辑
摘要: eg: 阅读全文
posted @ 2018-09-12 09:31 ForgotTheMemory 阅读(107) 评论(0) 推荐(0) 编辑