增加README.md
This commit is contained in:
parent
d02dc25475
commit
72cafd9bbb
@ -8,7 +8,7 @@
|
||||
2. 模板引擎采用freemaker 和 thymeleaf 作为示例,分别对应模板文件makershow.ftl 和 leafShow.html;
|
||||
3. spring boot 2.x 默认是不支持jsp的,需要额外的配置,关于使用jsp的整合可以参考[spring-boot-jsp](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring-boot/spring-boot-jsp)项目。
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-base.png"/> </div>
|
||||
|
||||
#### 1.2 项目依赖
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
|
||||
1. spring boot 项目默认继承自spring-boot-starter-parent,而spring-boot-starter-parent继承自spring-boot-dependencies, spring-boot-dependencies中定义了关于spring boot 依赖的各种jar包的版本,是spring boot 的版本管理中心。
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-dependencies.png"/> </div>
|
||||
|
||||
2. 关于spring boot 2.x官方支持的所有starter 可以参见官方文档 [Table 13.1. Spring Boot application starters](https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/htmlsingle/#using-boot-starter)
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#### 1.1 项目结构
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-data-jpa.png"/> </div>
|
||||
|
||||
#### 1.2 项目主要依赖
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
2. 为了使用druid控制台的功能,项目以web的方式构建。
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-druid-mybatis.png"/> </div>
|
||||
|
||||
#### 1.2 项目主要依赖
|
||||
|
||||
@ -187,7 +187,7 @@ public class DruidStatController {
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/druid-status.png"/> </div>
|
||||
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
1.2 本项目dubbo的搭建采用zookeeper作为注册中心, 关于zookeeper的安装和基本操作可以参见我的手记 [Zookeeper 基础命令与Java客户端](https://github.com/heibaiying/LearningNotes/blob/master/notes/%E4%B8%AD%E9%97%B4%E4%BB%B6/ZooKeeper/ZooKeeper%E9%9B%86%E7%BE%A4%E6%90%AD%E5%BB%BA%E4%B8%8EJava%E5%AE%A2%E6%88%B7%E7%AB%AF.md)
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-dubbo.png"/> </div>
|
||||
|
||||
|
||||
|
||||
@ -90,11 +90,11 @@
|
||||
- api 下为公共的调用接口;
|
||||
- bean 下为公共的实体类。
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/boot-dubbo-common.png"/> </div>
|
||||
|
||||
## 四、 服务提供者(boot-dubbo-provider)
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/boot-dubbo-provider.png"/> </div>
|
||||
|
||||
#### 4.1 提供方配置
|
||||
|
||||
@ -158,7 +158,7 @@ public class ProductService implements IProductService {
|
||||
|
||||
## 五、服务消费者(boot-dubbo-consumer)
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/boot-dubbo-consumer1.png"/> </div>
|
||||
|
||||
#### 1.消费方的配置
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#### 1.1 项目结构
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-jsp.png"/> </div>
|
||||
|
||||
#### 1.2 项目主要依赖
|
||||
|
||||
|
@ -10,7 +10,7 @@ spring boot 官方并没有提供关于 memcached 的starter,所以我们这
|
||||
|
||||
memcached的整合配置位于config文件夹下。
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-memcached.png"/> </div>
|
||||
|
||||
### 1.3 主要依赖
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
2. 提供用MongoTemplate的方式操作mongdb,见测试用例MongoOriginalTests.java
|
||||
3. 提供基于spring data jpa 的方式操作mongodb(推荐),见测试用例MongoJPATests.java
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-mongodb.png"/> </div>
|
||||
|
||||
#### 1.2 项目主要依赖
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
注解写法:对应的类为Programmer.java ,用MybatisAnnotationTest进行测试。
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-mybatis.png"/> </div>
|
||||
|
||||
#### 1.2 项目主要依赖
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
1.2 关于rabbitmq安装、交换机、队列、死信队列等基本概念可以参考我的手记[《RabbitMQ实战指南》读书笔记](https://github.com/heibaiying/LearningNotes/blob/master/notes/%E4%B8%AD%E9%97%B4%E4%BB%B6/RabbitMQ/%E3%80%8ARabbitMQ%E5%AE%9E%E6%88%98%E6%8C%87%E5%8D%97%E3%80%8B%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0.md),里面有详细的配图说明。
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-rabbitmq.png"/> </div>
|
||||
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
- bean 下为公共的实体类。
|
||||
- constant 下为公共配置,用静态常量引用。(这里我使用静态常量是为了方便引用,实际中也可以按照情况,抽取为公共配置文件)
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/rabbitmq-common.png"/> </div>
|
||||
|
||||
```java
|
||||
package com.heibaiying.constant;
|
||||
@ -109,7 +109,7 @@ public class RabbitInfo {
|
||||
|
||||
## 四、服务消费者(rabbitmq-consumer)
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/rabbitmq-consumer.png"/> </div>
|
||||
|
||||
#### 4.1 消息消费者配置
|
||||
|
||||
@ -189,7 +189,7 @@ public class RabbitmqConsumer {
|
||||
|
||||
## 五、 消息生产者(rabbitmq-producer)
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/rabbitmq-producer.png"/> </div>
|
||||
|
||||
#### 5.1 消息生产者配置
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
1. RedisConfig.java实现了redisTemplate 序列化与反序列化的配置;
|
||||
2. RedisOperation和RedisObjectOperation分别封装了对基本类型和对象的操作。
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-redis.png"/> </div>
|
||||
|
||||
#### 1.2 项目主要依赖
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
2. servlet、过滤器、监听器分别位于servlet、filter、listen 下,其中以Annotation命名结尾的代表是servlet注解方式实现,采用spring注册方式则在ServletConfig中进行注册;
|
||||
3. 为了说明外置容器对servlet注解的自动发现机制,项目采用外置容器构建,关于spring boot 整合外置容器的详细说明可以参考[spring-boot-tomcat](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring-boot/spring-boot-tomcat)
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-servlet.png"/> </div>
|
||||
|
||||
#### 1.2 项目依赖
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
spring boot 整合 tomcat 后支持jsp 的使用(内置容器默认是不支持jsp),所以项目整合后采用jspController 跳转到show.jsp测试整合是否成功。
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-tomcat.png"/> </div>
|
||||
|
||||
#### 1.2 项目主要依赖
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
3. 模板引擎采用freemaker;
|
||||
4. 项目以web的方式构建。
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-websocket.png"/> </div>
|
||||
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
2. 模板引擎采用freemaker 和 thymeleaf 作为示例,分别对应模板文件makershow.ftl 和 leafShow.html;
|
||||
3. spring boot 2.x 默认是不支持jsp的,需要额外的配置,关于使用jsp的整合可以参考spring-boot-jsp项目。
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-base.png"/> </div>
|
||||
|
||||
#### 1.2 项目依赖
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
|
||||
1. spring boot 项目默认继承自spring-boot-starter-parent,而spring-boot-starter-parent继承自spring-boot-dependencies, spring-boot-dependencies中定义了关于spring boot 依赖的各种jar包的版本,是spring boot 的版本管理中心。
|
||||
|
||||

|
||||
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/spring-boot-dependencies.png"/> </div>
|
||||
|
||||
2. 关于spring boot 2.x官方支持的所有starter 可以参见官方文档 [Table 13.1. Spring Boot application starters](https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/htmlsingle/#using-boot-starter)
|
||||
|
||||
|
@ -143,7 +143,7 @@ public class ProductService implements IProductService {
|
||||
}
|
||||
```
|
||||
|
||||
####
|
||||
|
||||
|
||||
## 五、服务消费者(dubbo-ano-consumer)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user