Skip to content

Commit c862ecd

Browse files
author
liqiangqiang
committed
文档
1 parent 9cf1281 commit c862ecd

File tree

15 files changed

+16
-659
lines changed

15 files changed

+16
-659
lines changed

README.md

Lines changed: 16 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,34 @@
22
spring boot 实践学习案例,是 spring boot 初学者及核心技术巩固的最佳实践。
33

44
# 推荐
5-
- [高性能 TCP/UDP 通信框架 HP-Socket](https://github.com/ldcsaa/HP-Socket)
6-
- springcloud-learning-example
7-
[spring cloud 实践学习案例](https://github.com/JeffLi1993/springcloud-learning-example)<br>
8-
https://github.com/JeffLi1993/springcloud-learning-example
5+
由于工作原因,我发表原创博客也需要编写的时间。期间很多人私我问题,没有及时得到回复,这里说声抱歉。因此,建一个星球
96

7+
「泥瓦匠BYSocket」和朋友们讨论技术相关的话题,你一起来吧?
8+
9+
[泥瓦匠BYSocket 星球](https://t.zsxq.com/nMzjqbe "泥瓦匠BYSocket")
10+
11+
[泥瓦匠BYSocket 星球](https://t.zsxq.com/nMzjqbe "泥瓦匠BYSocket")
12+
13+
[泥瓦匠BYSocket 星球](https://t.zsxq.com/nMzjqbe "泥瓦匠BYSocket")
14+
15+
这个星球里面讲深入讨论 Java 、Java EE、Spring Boot 等框架技术及工作经验交流,分享一路技术走来的经验、教训。硬实力软实力、择业、职业规划等。
16+
17+
## 计划
18+
Spring Boot 2.0 最大的热点肯定是 Web Flux。我这边也就开始操刀了...
19+
20+
Web Flux 努力进行中,尽情期待。唯一文章入口:[GitChat文章地址](http://gitbook.cn/gitchat/author/58968d35f2b669527d7a7c57 "gitchat")
1021

1122
## Spring For All 社区
1223
[Spring For All 社区](http://www.spring4all.com/ "spring4all")是新组建的关于 Spring 的纯技术交流社区(涵盖 Spring Boot、Spring Cloud 等内容),集诸多开源爱好者和技术大牛贡献内容和交流问题。我们不夸大、不装逼、做最纯粹的技术分享!!!
1324

14-
看看我们超强的群众基础,欢迎有兴趣的朋友加入QQ群分享与交流:
15-
Spring For All 社区 ⑪ 517395240 <br>
16-
Spring For All 社区 ⑫ 498098401 <br>
17-
18-
博主微信:139-5868-6678
25+
看看我们超强的群众基础,欢迎有兴趣的朋友加入QQ群分享与交流:[点击立即加入](http://www.spring4all.com/about "about")
1926

2027
## 作者与学习乐园
2128
源码地址:我的[GitHub地址](https://github.com/JeffLi1993 "GitHub")[OSCGit地址](https://git.oschina.net/jeff1993/springboot-learning-example "OSCGit")<br>
2229
作者:[泥瓦匠BYSocket](http://www.bysocket.com/ "泥瓦匠BYSocket")<br>
2330
关注微信公众号【泥瓦匠BYSokcet】,及时得到技术文章推送<br>
2431
![公众号](http://www.bysocket.com/wp-content/uploads/2017/01/qrcode_for_gh_cd421e7eb7d6_430.jpg)
2532

26-
2733
## 一、项目结构
2834
「Spring Boot 那些事」:[传送门](http://www.bysocket.com/?page_id=1639 "Spring Boot 那些事")<br>
2935

@@ -74,56 +80,6 @@ Dubbo 服务提供者工程和 Dubbo 服务消费者工程 <br>
7480
- spring-data-elasticsearch-query <br>
7581
spring-data-elasticsearch - 实战案例详解
7682

77-
## 二、项目 Quick Start 快速开发指南
78-
#### a. 基本环境配置
79-
在 MySQL 中,创建数据库 springbootdb:
80-
````
81-
CREATE DATABASE springbootdb;
82-
````
83-
创建表 city 城市 (因为我喜欢徒步)
84-
````
85-
DROP TABLE IF EXISTS `city`;
86-
CREATE TABLE `city` (
87-
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '城市编号',
88-
`province_id` int(10) unsigned NOT NULL COMMENT '省份编号',
89-
`city_name` varchar(25) DEFAULT NULL COMMENT '城市名称',
90-
`description` varchar(25) DEFAULT NULL COMMENT '描述',
91-
PRIMARY KEY (`id`)
92-
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
93-
````
94-
插入基础数据
95-
````
96-
INSERT city VALUES (1 ,1,'温岭市','BYSocket 的家在温岭。');
97-
````
98-
<br>
99-
100-
### 《 springboot-mybatis 工程 Quick Start 》
101-
首先 check 基本环境配置完成,创建好数据库和表。
102-
103-
#### 1. 修改数据库配置
104-
配置文件地址:springboot-mybatis/src/main/resources/application.properties
105-
修改相应的数据源配置,比如账号、密码等
106-
107-
#### 2. 编译工程
108-
在项目根目录 `springboot-learning-example`,运行 maven 指令:
109-
````
110-
mvn clean install
111-
````
112-
#### 3. 运行工程
113-
右键运行工程包中 `org.spring.springboot.Application` Spring Boot 应用启动类的 main 函数,然后在浏览器访问:
114-
`````
115-
http://localhost:8080/api/city?cityName=温岭市
116-
`````
117-
可以看到返回的 JSON 结果:
118-
````
119-
{
120-
"id": 1,
121-
"provinceId": 1,
122-
"cityName": "温岭市",
123-
"description": "我的家在温岭。"
124-
}
125-
````
12683
最后,<br/>
12784

128-
推荐
12985
[《Spring Boot教程与Spring Cloud教程》](https://git.oschina.net/didispace/SpringBoot-Learning "Spring Boot教程与Spring Cloud教程")<br>

chapter-2-spring-boot-quick-start/pom.xml

Lines changed: 0 additions & 84 deletions
This file was deleted.

chapter-2-spring-boot-quick-start/src/main/java/spring/boot/core/QuickStartApplication.java

Lines changed: 0 additions & 12 deletions
This file was deleted.

chapter-2-spring-boot-quick-start/src/main/java/spring/boot/core/domain/User.java

Lines changed: 0 additions & 79 deletions
This file was deleted.

chapter-2-spring-boot-quick-start/src/main/java/spring/boot/core/domain/UserRepository.java

Lines changed: 0 additions & 12 deletions
This file was deleted.

chapter-2-spring-boot-quick-start/src/main/java/spring/boot/core/service/UserService.java

Lines changed: 0 additions & 24 deletions
This file was deleted.

chapter-2-spring-boot-quick-start/src/main/java/spring/boot/core/service/impl/UserServiceImpl.java

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)