# java-spring-quick-start
**Repository Path**: qiugantao/java-spring-quick-start
## Basic Information
- **Project Name**: java-spring-quick-start
- **Description**: springboot快速启动脚手架
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 9
- **Forks**: 7
- **Created**: 2021-06-23
- **Last Updated**: 2025-02-13
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# java-spring-quick-start
### 开发工具
| 工具 | 说明 | 官网 |
| ------------- | ------------------- | ----------------------------------------------- |
| IDEA | 开发IDE | https://www.jetbrains.com/idea/download |
| Navicat | 数据库连接工具 | http://www.formysql.com/xiazai.html |
| Postman | API接口调试工具 | https://www.postman.com/ |
| Git | 版本管理工具 | https://git-scm.com/downloads |
### 开发环境
| 工具 | 版本号 | 下载 |
| ------------- | ------ | ------------------------------------------------------------ |
| JDK | 1.8 | https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html |
| Mysql | 5.7 | https://www.mysql.com/
| Maven | 3.5.4 | https://maven.apache.org/download.cgi
### 安装教程
1、配置Java开发环境:JDK+环境变量配置
2、导入数据库:document->sql->demo.sql
3、配置Maven依赖:settings.xml配置阿里云加速
```
alimaven
central
aliyun maven
http://maven.aliyun.com/nexus/content/repositories/central/
repo1
central
Human Readable Name for this Mirror.
http://repo1.maven.org/maven2/
repo2
central
Human Readable Name for this Mirror.
http://repo2.maven.org/maven2/
```
4、Git拉取项目
5、Idea配置Maven地址加载依赖:


5、启动Application:

6、效果:http://localhost:8081/swagger-ui.html#/

### 模块说明
1、java-api:
1.1、使用SpringBoot+Mybatis+Swagger2实现简单增删查改接口
1.2、使用DynamicDatasource实现多数据源配置的读写分离操作
[《MySQL主从复制从原理到实践》](https://blog.csdn.net/u014776211/article/details/118637158?spm=1001.2014.3001.5502)
[《使用dynamic datasource实现读写分离》](https://blog.csdn.net/u014776211/article/details/118657081?spm=1001.2014.3001.5502)
1.3、使用MockMvc进行Junit单元测试
[《SpringBoot调用MockMvc进行Junit单元测试》](https://blog.csdn.net/u014776211/article/details/118192683?spm=1001.2014.3001.5502)
2、java-http: 模拟调用java-api的接口,启动测试该服务前先启动java-api服务
2.1、使用Spring RestTemplate调用远程Http服务开发
[《RestTemplate调用远程Http服务开发》](https://blog.csdn.net/u014776211/article/details/118097207?spm=1001.2014.3001.5502)
[《AsyncRestTemplate异步调用远程Http服务开发》](https://blog.csdn.net/u014776211/article/details/118256715?spm=1001.2014.3001.5502)
2.2、使用OkHttp调用远程Http服务开发
[《HTTP接口交互开发之okhttp》](https://blog.csdn.net/u014776211/article/details/118436644?spm=1001.2014.3001.5502)