Skip to content

Commit 76d6fbb

Browse files
authored
Merge pull request #4 from rhwayfun/feature/module
merge develop
2 parents 60b97d1 + a35fdb7 commit 76d6fbb

File tree

211 files changed

+5838
-483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+5838
-483
lines changed

.travis.yml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
language: java
2-
jdk:
3-
- oraclejdk8
4-
env:
5-
global:
6-
- CC_TEST_REPORTER_ID=787a2f89b15c637323c7340d65ec17e898ac44480706b4b4122ea040c2a88f1d
7-
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
8-
rvm:
9-
- 2.2.0
10-
before_script:
11-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
12-
- chmod +x ./cc-test-reporter
13-
script:
14-
- bundle exec rspec
15-
# Preferably you will run test-reporter on branch update events. But
16-
# if you setup travis to build PR updates only, you don't need to run
17-
# the line below
18-
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
19-
# In the case where travis is setup to build PR updates only,
20-
# uncomment the line below
21-
# - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
2+
3+
sudo: false # faster builds
4+
5+
services:
6+
- mysql # start mysql service
7+
8+
before_install:
9+
- pip install --user codecov
10+
- mysql -e 'CREATE DATABASE springboot;' # create database springboot
11+
- mysql -e 'CREATE DATABASE springboot2;' # create database springboot2
12+
13+
after_success:
14+
- codecov

.travis.yml.bak

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: java
2+
3+
jdk:
4+
- oraclejdk8
5+
6+
sudo: false # faster builds
7+
8+
script: "mvn cobertura:cobertura"
9+
10+
after_success:
11+
- bash <(curl -s https://codecov.io/bash) -t e973842b-bf4c-4c04-b87d-5150d41e52bd

README.md

Lines changed: 92 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,96 @@
11
# spring-boot-learning-examples
2-
springboot知识点整理与工程实践
2+
![travis](https://travis-ci.org/rhwayfun/spring-boot-learning-examples.svg?branch=feature%2Fmodule)
3+
![coverage](https://codecov.io/gh/rhwayfun/spring-boot-learning-examples/branch/feature%2Fmodule/graph/badge.svg)
4+
5+
springboot知识点整理、工程实践,并结合工作案例适当深入
36

47
* 使用travis ci持续集成
5-
* 使用code climate进行代码质量检查
8+
* 使用codecov进行代码覆盖率检查
9+
* 学习案例以模块方式划分,每隔模块都是独立可执行项目,直接运行Application即可
10+
11+
## 分享平台
12+
13+
> 博客:http://blog.csdn.net/u011116672
14+
15+
> Github:https://github.com/rhwayfun
16+
17+
## 项目模块
18+
```
19+
└── 基础入门
20+
└── Web开发
21+
└── 缓存使用
22+
└── 数据库
23+
└── Spring其他功能
24+
└── 企业开发进阶
25+
```
26+
27+
### 基础入门
28+
29+
* spring-boot-quickstart(springboot快速入门案例)
30+
* spring-boot-configuration(了解下springboot配置管理)
31+
32+
### Web开发
33+
34+
* spring-boot-web-jsp(使用JSP作为开发)
35+
* spring-boot-web-thymeleaf(使用模板引擎thymeleaf开发)
36+
* spring-boot-web-bootstrap(bootstrap入门demo)
37+
* spring-boot-security(权限控制项目实战)
38+
* spring-boot-security-cas(集成CAS搭建自己的认证中心)
39+
40+
[spring security实战](http://blog.csdn.net/u011116672/article/details/77428049)
41+
42+
43+
### 缓存使用
44+
* spring-boot-cache-caffeine(高性能本地缓存框架caffeine实践)
45+
* spring-boot-cache-ehcache(Java应用最多的本地缓存Ehcache实践)
46+
* spring-boot-redis(分布式KV缓存redis实践)
47+
48+
### 数据库
49+
* spring-boot-mybatis(mybatis使用快速入门)
50+
* spring-boot-mybatis-annotation(mybatis全注解使用示例)
51+
* spring-boot-mybatis-multidatasource(mybatis多数据库解决方案)
52+
* spring-boot-mybatis-sharding-jdbc(使用sharding-jdbc对数据库进行分库分表)
53+
54+
### Spring其他功能
55+
* spring-boot-task(定时任务)
56+
57+
[Spring定时任务源码分析](http://blog.csdn.net/u011116672/article/details/77132205)
58+
59+
[深入浅出Spring task定时任务](http://blog.csdn.net/u011116672/article/details/52517247)
60+
* spring-boot-retry(重试和熔断)
61+
62+
[重试框架Spring retry实践](http://blog.csdn.net/u011116672/article/details/77823867)
63+
64+
* spring-boot-aspect(aop相关,静态织入、动态织入)
65+
66+
[AspectJ切面执行两次原因分析](http://blog.csdn.net/u011116672/article/details/63685340)
67+
68+
69+
### 企业开发进阶
70+
* spring-boot-dubbo(服务治理框架dubbo使用案例)
71+
* spring-boot-dubbo-annotation(服务治理框架dubbo案例,基于注解实现)
72+
* spring-boot-dubbo-extension(基于duboo扩展点实现自定义扩展)
73+
* spring-boot-disconf(分布式配置管理disconf使用案例)
74+
* spring-boot-elasticsearch(全文搜索引擎elasticsearch实践)
75+
* spring-boot-mongodb(NoSQL数据库mongodb实战)
76+
* spring-boot-kafka(消息中间件kafka实践)
77+
* spring-boot-rocketmq(阿里开源消息中间件RocketMQ实践)
78+
* spring-boot-mockito(Java社区最火的测试框架Mockito使用实战)
79+
* spring-boot-hibernate-validation(Hibernate出品的校验框架使用实战)
80+
* spring-boot-geode(内存数据库geode实战,目前应用与内部地址位置距离的计算)
81+
* spring-boot-ignite(内存数据库ignite实战)
82+
* spring-boot-elastic-job(分布式任务调度框架elastic-job实战)
83+
* spring-boot-starter(自定义spring boot starter)
84+
* spring-boot-starter-rest(自定义spring boot starter)
85+
* spring-boot-logging-log4j2(使用log4j2)
86+
87+
## 准备工作
88+
89+
* [数据库脚本](docs/sql/springboot/spring-boot-mybatis.sql)
90+
* IDE运行`mvn clean compile`
91+
92+
93+
## 未完待续
94+
更多案例不断补充中。。。如果您觉得对你有用,就给我点个赞吧\(^o^)/~
95+
696

File renamed without changes.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* 创建用户travis,因为travis是travis-ci默认的用户名 */
2+
create user travis@localhost;
3+
/* 授权语句(所有数据库的所有权限) */
4+
grant all privileges on *.* to travis@127.0.0.1;/* mac系统下127.0.0.1要改成localhost */
5+
/* 查看MySQL所有用户 */
6+
SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;
7+
/* 查看travis用户的权限 */
8+
show grants for travis@localhost;
9+
10+
11+
12+
13+
/* Database springboot */
14+
15+
CREATE DATABASE springboot;
16+
17+
CREATE TABLE `user` (
18+
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增,主键',
19+
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
20+
`user_name` varchar(15) DEFAULT NULL,
21+
`age` int(11) DEFAULT NULL COMMENT '年龄',
22+
`birth` date DEFAULT NULL COMMENT '生日',
23+
PRIMARY KEY (`id`),
24+
UNIQUE KEY `id_UNIQUE` (`id`)
25+
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='用户信息表';
26+
27+
ALTER TABLE `springboot`.`user`
28+
CHANGE COLUMN `user_id` `user_id` BIGINT(20) NOT NULL COMMENT '用户id' ,
29+
ADD UNIQUE INDEX `user_id_UNIQUE` (`user_id` ASC);
30+
31+
/* Database springboot2 */
32+
33+
CREATE DATABASE springboot2;
34+
35+
CREATE TABLE `city` (
36+
`id` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '记录ID',
37+
`name` varchar(128) DEFAULT NULL COMMENT '城市名称',
38+
`is_active` tinyint(3) unsigned DEFAULT '0' COMMENT '是否开放',
39+
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
40+
`modify_time` datetime DEFAULT NULL COMMENT '修改时间',
41+
PRIMARY KEY (`id`),
42+
KEY `idx_name` (`name`)
43+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='城市信息表';

0 commit comments

Comments
 (0)