• Stars
    star
    304
  • Rank 136,736 (Top 3 %)
  • Language
  • Created over 6 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Spring 5 Samples(Spring 5 案例大全/《Spring 5 开发大全》示例源码) covers Spring 5, Spring MVC, Spring WebFlux, Spring Boot and Spring Cloud.

Spring 5 Samples(Spring 5 案例大全)/《Spring 5 开发大全》示例源码

内容简介

自 Spring 诞生以来,以 Spring 技术栈为核心的企业级应用开发方式深入人心,已经成为 Java EE 开发的最佳实践。随着 Spring 5 版本的发布,Spring 自身也发生了巨大的变革。本书力求全面介绍 Spring 框架,涵盖了 Spring 核心、测试、数据访问、Web 开发、响应式编程、系统集成及微服务等方面在内的共26 章的内容,可以说是 Spring 技术的“百科全书”。

同时,本书基于 Spring 5 版本来编写,除了涉及 Spring 5 版本的新特性外,还介绍了 REST 服务、响应式 Web 开发、微服务设计、Spring Boot、Spring Cloud 等方面的前瞻技术。而且除了讲解 Spring 的理论知识外,还在每个知识点上辅以大量的代码案例,使理论可以联系实际,具备更强的可操作性。

本书主要面向的是Java 开发者,以及对以Spring 为核心的Java EE 开发感兴趣的计算机专业的学生、软件开发人员和系统架构师。

案例涉及 Spring 5 最新的技术。

技术版本如下:

  • Apache Maven 3.5.2
  • Gradle 4.5
  • Spring 5.1.1.RELEASE
  • Servlet 4.0.0
  • JUnit 4.12
  • Lo4j 2.6.2
  • DBCP 2.5.0
  • H2 1.4.196
  • Eclipse Jetty 9.4.11.v20180605
  • Jackson JSON 2.9.6
  • Apache HttpClient 4.5.5
  • SockJS-client 1.1.4
  • STOMP Over WebSocket 2.3.3
  • Reactive Streams Netty Driver 0.7.6.RELEASE
  • JMS API 2.0.1
  • ActiveMQ 5.15.3
  • JavaMail 1.6.1
  • Logback Classic Module 1.2.3
  • Quartz Scheduler 2.3.0
  • Spring Boot 2.0.1.RELEASE
  • Spring Cloud Finchley.M9

写作背景

Spring 自诞生以来,一直被广大开发者作为 Java 企业级应用开发的首选。无论是早年流行的 SSH 框架(Spring、Struts、Hibernate),还是近些年盛行的 SSM 组合(Spring、Spring MVC、MyBatis), 唯一不变的就是 Spring。伴随互联网十几年的风云变迁,Spring 也不断地进行着技术革命,向着云计算、平台化方向发展。

Spring 至今仍然奉行着最初的宗旨——简化企业级应用的开发。特别是 Spring Boot、Spring Cloud 等项目的诞生,进一步简化了基于 Spring 的企业级、分布式系统的应用开发方式。为此,笔者在2014 年以开源方式翻译了《Spring Framework 4.x 参考文档》,备受广大开发者关注。在2017 年,笔者编写了一系列关于 Spring 开发实战的书籍及培训视频教程,包括《Spring Boot 企业级应用开发实战》和《Spring Cloud 微服务架构开发实战》等(见https://waylau.com/books/) ,致力于让广大读者能够真正领略 Spring 所带来的力量和乐趣。

目前,Spring 5 已经发布,并带来了大量的新特性。鉴于市面上关于 Spring 5 的介绍资料比较匮乏,故笔者撰写本书以补空白,助力国内开发者能够享受到新技术所带来的便利。

本书特色

本书具有以下特色。

  • (1)全面:本书全面介绍 Spring 框架,涵盖了 Spring 核心、测试、数据访问、系统集成、Web 开发、响应式编程及微服务等方面在内的共26 章的内容,可以说是 Spring 技术的“百科全书”。
  • (2)前瞻:本书基于 Spring 5 版本来编写,除了涉及 Spring 5 版本的新特性外,还介绍了 REST 服务、响应式 Web 开发、微服务设计、Spring Boot 及Spring Cloud 等方面的前瞻技术。
  • (3)实用:本书除了讲解 Spring 的理论知识外,还在每个知识点上辅以大量的实战案例,使理论可以联系实际,具备更强的可操作性。
  • (4)简明:目录标注有“新功能”“难点”及“重点”等标识,方便读者做好知识点的归纳和总结。
  • (5)权威:以 Spring 官方文档和 Spring 框架源码为主要参考依据,确保知识点的权威性。

Code 源码

所有示例源码,移步至https://github.com/waylau/spring-5-book/ samples 目录下

内容如下:

  • s5-ch01-hello-world:快速开启第一个 Spring 应用
  • s5-ch02-dependency-injection:依赖注入的例子
  • s5-ch02-custom-scope:自定义scope的例子
  • s5-ch02-aop-aspect:使用 @AspectJ 的例子
  • s5-ch02-aop-aspect-xml:基于 XML 的 AOP 的例子
  • s5-ch02-expression-language:使用 SpEL 的例子
  • s5-ch05-mvc-test:服务端测试的例子
  • s5-ch05-client-side-rest-test:客户端 REST 测试的例子
  • s5-ch06-declarative-transaction:声明式事务管理的例子
  • s5-ch08-jdbc-template:使用 JdbcTemplate 的例子
  • s5-ch08-jdbc-object-mapping:JDBC 转为对象模型的例子
  • s5-ch08-embedded-database:使用内存数据库进行测试的例子
  • s5-ch10-jaxb-oxm:使用 JAXB 解析 XML 的例子
  • s5-ch11-mvc-rest:基于 Spring Web MVC 的 REST 接口
  • s5-ch12-rest-template:基于 RestTemplate 的天气预报服务
  • s5-ch13-websocket-stomp:基于 STOMP 的聊天室
  • s5-ch15-webclient-file:基于 WebClient 的文件上传、下载
  • s5-ch19-jms-msg:基于 JMS 的消息发送、接收
  • s5-ch22-java-mail:实现 Email 服务器
  • s5-ch23-quartz-scheduler:基于 Quartz Schedule 天气预报系统
  • s5-ch24-java-cache:基于缓存的天气预报系统
  • s5-ch25-initializr-start:开启第一个 Spring Boot 项目
  • s5-ch26-eureka-server、s5-ch26-eureka-client:实现微服务的注册与发现

配套书籍《Spring 5 开发大全》

与该源码配套的书籍《Spring 5 开发大全》已经出版,内容详见全书目录

本书如有勘误,会在https://github.com/waylau/spring-5-book/issues上进行发布。由于笔者能力有限,时间仓促,难免错漏,欢迎读者批评指正。

您也可以上豆瓣给老卫打Call。

如何获取本书

实体店及各大网店有售。据我所知有如下网站供应:

想低于市价得到本书?来二手书集市试试看。

也可以直接关注我博客(https://waylau.com/)或者我的开源书(https://waylau.com/books/)了解更多免费咨询。

联系作者

您也可以直接联系我:

其他书籍

若您对本书不感冒,笔者还写了其他方面的超过一打的书籍(可见https://waylau.com/books/),多是开源电子书。

本人也维护了一个books-collection项目,里面提供了优质的专门给程序员的开源、免费图书集合。

开源捐赠

开源捐赠

捐赠所得所有款项将用于开源事业!见捐赠列表

More Repositories

1

books-collection

To the programmer's open source and free books collection 给程序员的开源、免费书籍收集,图书集合。
2,616
star
2

git-for-win

Git for Windows. 国内直接从官网下载比较困难,需要翻墙。这里提供一个国内的下载站,方便网友下载
2,316
star
3

netty-4-user-guide

Chinese translation of Netty 4.x User Guide. 中文翻译《Netty 4.x 用户指南》
2,312
star
4

netty-4-user-guide-demos

Netty demos. (Netty 案例大全)
Java
1,848
star
5

essential-netty-in-action

It is a book about the Essentials of Norman Maurer's Netty in Action.《Netty 实战(精髓)》是对 Norman Maurer 的 《Netty in Action》的一个精简
1,777
star
6

spring-framework-4-reference

Chinese translation of the Spring Framework 4.x Reference Documentation (https://docs.spring.io/spring/docs/4.3.13.RELEASE/spring-framework-reference/html/) .中文翻译《Spring Framework 4.x参考文档》
1,478
star
7

harmonyos-tutorial

HarmonyOS Tutorial. 《跟老卫学HarmonyOS开发》
1,008
star
8

github-help

Chinese translation of the Github Help(https://help.github.com/index.html) and the other article collection. 《Github 帮助文档》 中文翻译(包含了官方文档以及其他文章)。
840
star
9

java-virtual-machine-specification

Chinese translation of The Java® Virtual Machine Specification.《Java 虚拟机规范(第11版)》中文翻译及示例,Java SE 11 版
831
star
10

essential-java

Essential Java, is a book about the Essentials of Java Programming.《Java 编程要点》是一本 Java 的学习教程,主要介绍 Java 中应用广泛的部分,其中也包括了最新版本 Java 8 中的新特性,也算是个人对多年 Java 开发工作的总结。取其精华,图文并茂,并通过大量实例让你走近 Java 的世界!
607
star
11

distributed-systems-technologies-and-cases-analysis

《分布式系统常用技术及案例分析》示例源码
494
star
12

rest-in-action

REST in Action 《REST 实战》。基于 Jersey 构建 RESTful 服务。
470
star
13

apache-shiro-1.2.x-reference

Chinese translation of the Apache Shiro Reference Manual(http://shiro.apache.org/reference) and the other article collection. You can also see the demos of the reference at (https://github.com/waylau/apache-shiro-1.2.x-reference-demos). 《Apache Shiro 参考手册》 中文翻译(包含了官方文档以及其他文章)
467
star
14

spring-security-tutorial

Spring Security Tutorial takes you to learn Spring Security step by step with a large number of samples. Spring Security Tutorial 是一本关于 Spring Security 学习的开源书。利用业余时间写了本书,图文并茂,用大量实例带你一步一步走进 Spring Security 的世界。
412
star
15

spring-boot-tutorial

Spring Boot Tutorial takes you to learn Spring Boot step by step with a large number of samples.Spring Boot Tutorial 是一本关于 Spring Boot 学习的开源书。用大量实例带你一步一步走进 Spring Boot 的世界。
412
star
16

Gradle-2-User-Guide

Gradle 2 User Guide 中文翻译《Gradle 2 用户指南》
407
star
17

vpngate-mirrors

Here are the newset VPN Gate web site’s mirrors .With the VPN Gate, you can get through your government's firewall to browse restricted websites.提供最新的访问 VPN Gate 镜像网站,通过使用 VPN 自由访问互联网(翻墙)!
386
star
18

distributed-java

Distributed Java.《分布式 Java》
349
star
19

mongodb-file-server

MongoDB File Server is a file server system based on MongoDB. 基于 MongoDB 的文件服务器。
Java
324
star
20

free-vpn

We Provide Newset Free VPN Service. PC, mobile phones and network appliances, no software installation. With the VPN Service,you can get through your government's firewall to browse restricted websites.提供最新的免费的 VPN 服务,通过使用 VPN 自由访问互联网(翻墙)!无论是PC端,移动端都无需安装客户端。
324
star
21

spring-boot-enterprise-application-development

Spring Boot Enterprise Application Development.《Spring Boot 企业级应用开发实战》
279
star
22

Jersey-2.x-User-Guide

Jersey 2.x User Guide《Jersey 2.x 用户指南》 ,中文翻译
245
star
23

apache-mina-2.x-user-guide

Chinese translation of the Apache MINA User Guide (http://mina.apache.org/mina-project/userguide/user-guide-toc.html) .中文翻译《Apache MINA 2 用户指南》
219
star
24

jquery-easyui

jquery-easyui lib , update form http://www.jeasyui.com/, useful for git and bower . 给 git and bower 提供lib,与 easyui 官网保持同步
CSS
219
star
25

java-code-conventions

Chinese translation of the Code Conventions for the Java Programming Language document.中文翻译《Java 编码规范》
208
star
26

css3-tutorial

CSS3 Tutorial. 《CSS3 教程》
205
star
27

thymeleaf-tutorial

Thymeleaf Tutorial.
204
star
28

activiti-5.x-user-guide

Chinese translation of the Activiti 5.x User Guide(http://activiti.org/userguide/index.html) . 《Activiti 5.x 用户指南》 中文翻译。
195
star
29

gradle-3-user-guide

Gradle 3 User Guide 中文翻译《Gradle 3 用户指南》
179
star
30

spring-cloud-tutorial

Spring Cloud Tutorial.《Spring Cloud 教程》
178
star
31

RestDemo

RESTful Web Service Demos with Jersey ,Hibernate,Mysql,SQLserver,jQuery,AangularJS,Boostrap. (REST 案例大全)
JavaScript
169
star
32

servlet-3.1-specification

JSR 340: Java Servlet 3.1 Specification 《Java Servlet 3.1 规范》中文翻译及示例。
165
star
33

modern-java-demos

Modern Java: From Java 8 to Java 22. 现代Java案例大全/《Java核心编程》源码
124
star
34

spring-cloud-microservices-development

Spring Cloud Microservices Development.《Spring Cloud 微服务架构开发实战》
109
star
35

nodejs-book-samples

Node.js Samples. (Node.js 案例大全)《Node.js企业级应用开发实战》源码
102
star
36

vuejs-enterprise-application-development

Vue.js Enterprise Application Development. 《跟老卫学Vue.js开发》/《Vue.js 3企业级应用开发实战》源码
88
star
37

new-star-blog

NewStarBlog is an open source Java blog platform. NewStarBlog是国产开源Java博客平台。
JavaScript
82
star
38

nginx-tutorial

NGINX Tutorial.《NGINX 教程》
67
star
39

easyui-scaffold

Easyui-scaffold is a front-end development of scaffold, which based on the EasyUI(www.jeasyui.com) and jquery-easyui(https://github.com/waylau/jquery-easyui) . The rapid establishment of enterprise application model. 基于 EasyUI(www.jeasyui.com) 和 jquery-easyui(https://github.com/waylau/jquery-easyui) 前端开发脚手架。快速建立企业应用模型。
HTML
55
star
40

jdbc-specification

JDBC 4.2 Specification(JSR 221).《JDBC 4.2 规范》中文翻译。
47
star
41

Gradle-2-User-Guide-Demos

Demos of Gradle 2 User Guide 《Gradle 2 用户指南》中文翻译,文中用到的例子源码
Java
47
star
42

h2-database-doc

It is a book about the H2 Database Engine.《H2 Database 教程》
44
star
43

svg-china-map

基于d3.js的svg中国地图实例
42
star
44

goChat

Golang chat.This example application shows how to use WebSockets, the Go programming language and jQuery to create a simple web chat application. 这个示例应用程序展示了如何使用 WebSocket, Golang 和 jQuery 创建一个简单的 web 聊天应用程序。这个示例的文章介绍见《WebSocket 和 Golang 实现聊天功能》 。
Go
42
star
45

everything-in-eclipse

Everything is in Eclipse. As a Java Devloper, I consider Eclipse as my first IDE. Eclipse is more powerful than you think. So I collected the commonly used Eclipse plugins here.
40
star
46

angular-enterprise-application-development-samples

Angular Enterprise Application Development Samples. 《Angular企业级应用开发实战》源码
38
star
47

apache-shiro-1.2.x-reference-demos

Demos of Apache Shiro 1.2.x Reference《Apache Shiro 1.2.x 用户指南》中文翻译,文中用到的例子源码
Java
38
star
48

jekyll-bootstrap-blog

A theme for Jekyll to build a personal blog, , based on Bootstrap 3, Font Awesome and jQuery. Jekyll 博客主题,基于Bootstrap 3、Font Awesome和jQuery。
JavaScript
35
star
49

cordova-dev-guide

Apache Cordova Development Guide.《Apache Cordova 开发指南》,中文。
33
star
50

docker-demos

Demos of Docker usage.
32
star
51

angular-tutorial

Angular Tutorial.《跟老卫学Angular》
28
star
52

apache-mina-2-user-guide-demos

Demos of Apache MINA User Guide《Apache MINA 2 用户指南》中文翻译,文中用到的例子源码
Java
28
star
53

jsse-reference-guide

This is a Chinese translation of Java Secure Socket Extension (JSSE) Reference Guide, and also provides a lot of useful examples about JSSE. 本书是《JSSE 参考指南》的中文翻译,同时提供了大量 JSSE 实例
28
star
54

apache-isis-tutorial

Apache Isis Tutorial.《Apache Isis 教程》是一本关于 Apache Isis 应用学习的开源书。
24
star
55

Jersey-2.x-User-Guide-Demos

Demos of Jersey 2.x User Guide《Jersey 2.x 用户指南》中文翻译,文中用到的例子源码。
Java
21
star
56

apache-spark-tutorial

Apache Spark Tutorial.《跟老卫学Apache Spark》
20
star
57

apache-kafka-tutorial

跟老卫学Apache Kafka开发
19
star
58

harmonyos-exam

harmonyos-exam
17
star
59

waylau.github.io

waylau's blog 个人技术博客
HTML
16
star
60

cloud-native-book-demos

Cloud Native Samples. Cloud Native 案例大全/《Cloud Native 分布式架构原理与实践》示例源码
15
star
61

mean-book-samples

MEAN Samples. (MEAN架构应用示例)
14
star
62

ehcache-tutorial

Ehcache Tutorial.《跟老卫学Ehcache开发》
13
star
63

java-data-structures-and-algorithms-in-action

Java Data Structures and Algorithms In Action. Java数据结构和算法实战
Java
12
star
64

gradle-user-guide

Gradle User Guide 中文翻译《Gradle 用户指南》
12
star
65

java-ee-enterprise-development-samples

java-ee-enterprise-development-samples
12
star
66

lite-book-demos

《大型互联网应用轻量级架构实战》示例源码
11
star
67

gitbook

This is a simple template shows how to quickly start a [GitBook](https://www.gitbook.io) Welcome to vist my bolg at http://www.waylau.com
11
star
68

db2-tutorial

DB2 Tutorial 《DB2 教程》是一本关于 DB2 的开源书。
11
star
69

nowcoder-exam-oj

nowcoder-exam-oj 牛客题霸-在线编程 题库题解
Java
11
star
70

ionic-framework-tutorial

Ionic Framework Tutorial.《跟老卫学Ionic》
11
star
71

nwjs-demos

Demos of NW.js (http://nwjs.io) 《NW.js 入门指南》
HTML
9
star
72

go_for_java_programmers

《Go For Java Programmers》(面向Java开发者的GO编程) 中文翻译;让JAVA编程者快速掌握GO语言
HTML
9
star
73

lite

Lite is a lightweight Java Web framework, based on Spring, MyBatis and MySQL.
Java
7
star
74

java-trusted-coding-exam

Java Trusted Coding Exam. Java安可认证阶段考试——可信编码实现
7
star
75

html-css-demo

Useful html and css demos. 一些自己写的 html 和 css 相关的案例
CSS
7
star
76

second-hand-books

Second hand books.二手书集市——面向程序员的二手书市场。你的闲置,正是人家所需。让知识流动起来!
7
star
77

essential-javaee

Essential Java EE, is a book about the Essentials of Java Enterprise Edition Programming.《Java EE 编程要点》
6
star
78

webix-tutorial

Webix Tutorial 《Webix 教程》一本关于 Webix 学习的开源书。
6
star
79

AngulaJS-demos

Demos of AngularJS. It is very usefull for new users. AngularJS 项目实例,由浅入深。
JavaScript
6
star
80

ui-compressor

UI-Compressor ,a tool for compressing js and css files. 前端代码压缩工具
Java
6
star
81

lite-news-server

A news app server-side based on Lite framework.
Java
5
star
82

maven-demo

There are some demos show you how to build java project with maven.如何用Maven编译java项目实例
Java
5
star
83

poi-demos

poi-demos
Java
4
star
84

snmp4j-demos

snmp4j-demos
Java
4
star
85

spring-cloud-stream-tutorial

spring-cloud-stream-tutorial
4
star
86

lite-spring-boot-starter

lite-spring-boot-starter
Java
4
star
87

full-stack-development-with-vuejs-and-spring-boot

full-stack-development-with-vuejs-and-spring-boot
4
star
88

full-stack-development-with-vuejs-and-nodejs

https://github.com/waylau/full-stack-development-with-vuejs-and-nodejs
4
star
89

java-trusted-testing-exam

Java Trusted Testing Exam. Java安可认证阶段考试——开发者测试
3
star
90

jekyll-theme-blog

A theme for Jekyll to build a personal blog
CSS
3
star
91

opc-client

opc-client
Java
3
star
92

spring-framework-4-demos

spring-framework-4-demos
Java
3
star
93

java-high-concurrency-in-action

java-high-concurrency-in-action
3
star
94

h2-demos

Demos of H2 Database Engine. 有关 H2 数据库的示例
Java
3
star
95

distributed-system-tutorial-samples

3
star
96

lite-monitoring

Lite Monitoring is a fast and cross-platform open source monitoring solution for operating systems monitoring. It has the ability to collect system information, such as OS version, processes, memory & CPU usage, disks & partitions, devices, sensors, etc.
Java
3
star
97

modern-c-programming

Modern C Programming. 现代C语言编程实战
2
star
98

mytodo

The Demo shows how to build an AngularJS application `Mytodo` with Yeoman in Windows operation system dev environment.在Windows环境下用Yeoman构建AngularJS项目 `Mytodo`源码
JavaScript
2
star
99

lite-monitoring-ui

lite-monitoring-ui
TypeScript
2
star
100

d3js-demo

HTML5 demos with d3js.
2
star