Pro+Spring+5


-
Pro+Spring+5 高清
Pro Spring 5: An In-Depth Guide to the Spring framework and Its Tools Iuliana cosmin Rob Harrop Sibiu, sibiu romania Reddish, United Kingdom Chris Schaefer Clarence ho Venice, Florida, USA Hong Kong, China ISBN-13(pbk:978-1-48422807-4 ISBN-13( electronic):978-1-4842-2808-1 DOI10.1007/978-1-4842-2808-1 Library of Congress Control Number: 2017955423 Copyright o 2017 by juliana Cosmina, Rob Harrop, Chris Schaefer, and Clarence Ho This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights While the advice and information in this book are believed to be true and accurate at the date of publication neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein CoverimagebyFreepik(www.freepik.com Managing Director: Welmoed Spahr Editorial director: Todd green Acquisitions Editor: Steve Anglin Development Editor: Matthew Moodie Technical reviewer: Massimo nardone Coordinating editor: Mark Powers Copy Editor: Kim Wimpsett Distributed to the book trade worldwide by springer Science+Business Media New york 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax(201)348-4505, e-mail orders-nyospringer-sbm.comorvisitwww.springeronline.comApressMedia,LlcisaCaliforniaLlc and the sole member(owner )is Springer Science Business Media Finance Inc (SSBM Finance Inc) SSBM Finance Inc is a Delaware corporation Forinformationontranslationspleasee-mailrights@apress.comorvisitwww.apress.com/ rights- permissions press titles may be purchased in bulk for academic, corporate, or promotional use eBook versions and licenses are also available for most titles. For more information reference our print and ebook bulk Saleswebpageatwww.apress.com/bulk-sales Any source code or other supplementary material referenced by the author in this book is available to readersonGithubviathebooksproductpagelocatedatwww.apRess.com/9781484228074.Formore detailedinformationpleasevisitwww.apress.com/source-code Printed on acid-free paper I dedicate this book to my friends, to my godson stefan, and to all the musicians who have made working on this book easy with their music Juliana cosmin Contents at a glance About the authors ■■■■■■■■■■■ About the technical reviewer xXV Acknowledgments ammmmmamnmmaaaamammamaamnmmaaaamnmamaanm XXVii Introduction ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ XXIX Chapter 1: Introducing Spring ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■國■■■■ Chapter 2: Getting Started mamaaamamammmmam 19 Chapter3; ntroducing loc and DI in Spring…,,,,,…mm,,m……37 Chapter 4: Spring Configuration in Detail and Spring Boot mmmammma 125 Chapter 5: Introducing Spring AOPmmma ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■口■■■ 211 Chapter 6: Spring JDBC Support ammammmmmm RBIBIRRIBIaRImIaRInaam 297 Chapter7: Using Hibernate in Spring…,,,…,,,,,,,,,,…,,……355 Chapter 8: Data Access in Spring with JPA2 maaaa maI 393 Chapter 9: Transaction Management ammmammammmmmmamaama 467 Chapter 10: Validation with Type Conversion and Formatting mm 509 Chapter11: Task Scheduling…,,…,,,,,m,…,,,,m…m,m,,,537 Chapter 12: Using Spring 557 Chapter 13: Spring Testing mmmmmammammm ImmI 615 ■ Chapter14: Scripting Support in Spring,,,,…,,,,…,639 Chapter 15: Application Monitoring aaaaaaaaaa aRaananaaa aIIIRRLaan 655 CONTENTS AT A GLANCI Chapter 16: Web Applications nmmamaamaammmaammmmamm 665 Chapter 17: Web Socket tr ■■■■■■■■國■■■■■■■■■■■■■■■■■■■■■■■國■■■■■■■■■■■國■■■■■■■■■■■■■国a■■■■a■国 751 Chapter 18: Spring Projects: Batch, Integration, XD, and More mm 773 Appendix A: Setting Up Your Development Environment 829 Index 841 Contents About the authors ■■■■■■■■■■■ About the technical reviewer xXV Acknowledgments ammaaaamammaaamammmmamamammmmaaaammmaaaannma xxvii Introduction m xxix Chapter 1: Introducing Spring ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■國■■■■ What Is Spring 112 Evolution of the spring Framework Inverting Control or Injecting Dependencies?........................8 Evolution of Dependency Injection 8 Beyond Dependency Injection.. The Spring project 15 Origins of Spring...... 15 The Spring community 15 The Spring Tool Suite..........................................16 The Spring security project Spring boot Spring batch and Integration.…………17 Many other Projects.............. 17 Alternatives to Spring… 17 JBoSsSeamFramework…17 Google Guice 17 Picocontainerwwwwww.17 JEE 7 Container Summary 18 CONTENTS Chapter 2: Getting Startedaammmmmmmmaammmmnm 19 Obtaining the Spring Framework 20 Getting Started Quickly 20 Checking Spring Out of GitHub Using the Right JDK… 21 Understanding Spring Packaging………21 Choosing Modules for Your Application 24 Accessing Spring Modules on the Maven Repository. .............24 Accessing Spring Modules Using Gradle................... Using Spring Documentation....... Putting a Spring into Hello World 27 Building the Sample Hello World Application.............……….27 Refactoring with spring ..........................................................................................31 Summary…….......……………35 Chapter 3: Introducing loc and DI in Spring ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■ 37 Inversion of control and dependency Injection. mmmmmmmmemmnnn 37 Types of Inversion of Control...... 38 Dependency Pull Contextualized Dependency Lookup 39 Constructor Dependency Injection Setter Dependency Injection................................41 Injection VS. Lookup ,41 Setter Injection vs. Constructor Injection 42 Inversion of Control in Spring 5 Dependency Injection in Spring 46 Beans and Bean Factory . Bean Factory Implementations....,.,.,,,………,46 ApplicationContext.…...…48 Configuring ApplicationContext 48 Setting Spring Configuration Options Basic Configuration Overview CONTENTS Declaring Spring Components….....…………50 Using Method Injection Understanding Bean Naming…,,,,………………95 Understanding Bean Instantiation Mod Resolving dependencies 109 Autowiring Your Bean…… …112 When to Use Autowiring Setting Bean Inheritance.......……122 Summary 124 Chapter 4: Spring Configuration in Detail and Spring Boot ammm 125 Spring's Impact on Application Portability 126 Bean Life-Cycle Management …127 Hooking into Bean Creation 128 Executing a Method When a Bean Is created.......... 128 Implementing the Initializing Bean Interface 132 Using the JSR- 250 @PostConstruct Annotation Declaring an Initialization Method using @Bean..mm...m.... 137 Understanding Order of Resolution ...................................138 Ho0 king into Bean Destructi0n...……139 Executing a Method When a Bean Is Destroyed 139 Implementing the DisposableBean Interface. Using the JSR-250@ PreDestroy Annotation........………,143 Declaring a Destroy Method Using @Bean....om..eo.... 144 Understanding Order of Resolution.m....m..m....146 Using a Shutdown Hook 146 Making Your Beans“ Spring Aware” 146 Using the bean Name Aware Interface Using the application ContextAware Interface. Use of Factory beans 151 Factory Bean EXample: The MessageDigestFactory Bean CONTENTS Accessing a Factory Bean Directly 156 Using the factory-bean and factory-method Attributes 157 JavaBeans PropertyEditors )usssnsssnsssnnssnnssnnssnsssnnssnnssnnssnBSSEIIE ,158 Using the built-in Property Editors.......................... 159 Creating a Custom Property Editor 164 More Spring application Context Configuration .. Internationalization with the Message Source 168 Using Message Source in Stand-Alone applications..........................171 Application Events Accessing Resources 174 Configuration Using Java classes . ApplicationContext Configuration in Java................................175 Spring mixed configuration....…………185 Java or XML Configuration? 187 Profiles 187 An Example of Using the Spring Profiles Feature...........................187 Spring Profiles Using Java configuration.............. ,190 Considerations for Using profiles Environment and Property Source Abstraction……,,,,…,… 193 Configuration Using JSR-330 Annotations ,198 Configuration Using Groovy…,,,.,,.,,… 201 Spring Boot.… 204 Summary… 210 Chapter 5: Introducing Spring AOP. ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■口■■■■■国■口国■■ 211 AOP Concepts 212 Types of AOP.. 213 Using Static AOP… 213 Using dynamic AOP 213 Choosing an AoP Type .

39.63MB
spring5.1.9.zip
2019-08-22spring5.1.9版本 jar包,与jdk 1.8 以上的版本兼容,祝大家使用愉快~~~
1.66MB
Spring5.zip
2019-08-02Spring运行helloworld所需的三个基础包,分明为com.springsource.org.apache.commons.logging-1.1.1.jar,spring-beans-5.0
8.44MB
spring5.1.8.zip
2019-09-08JavaWeb项目中需要用到spring5.1.8框架所需要用到的jar包
Spring5.zip下载_course
2020-07-06Spring运行helloworld所需的三个基础包,分明为com.springsource.org.apache.commons.logging-1.1.1.jar,spring-beans-5.0
70.94MB
Spring5jar包 完整版下载
2018-03-05Spring5jar包 完整版下载,spring5 类库,官方下载,最全代码
76.94MB
spring5.1.1
2018-10-27spring framework 5.1.1,内含jar包,日志,以及doc文件
9.84MB
精通spring5
2017-10-20精通spring5 正式版 精通spring5 正式版精通spring5 正式版精通spring5 正式版精通spring5 正式版精通spring5 正式版精通spring5 正式版精通spring
1.27MB
spring-web-5.1.0.RELEASE
2018-09-27spring-web-5.1.0.RELEASE,最新spring-web jar包。
37.18MB
spring5.0官网下载的完整jar
2018-01-23官网下载的最新5.0版本,包含完整的jar和resource文件
5.52MB
spring5 jar包
2017-02-16包含16个最新的spring-5.0.0.M4版本的jar包
78.97MB
Spring5-jar包(5.1.9版本)
2019-08-16Spring官方下载jar包;Spring-5.1.9版本框架完整压缩包,jar包;版本号:5.1.9。
1.6MB
spring5介绍
2018-01-02spring5介绍:响应式编程介绍。spring5介绍:响应式编程介绍
34KB
spring5.x 整合 mybatis 3.x
2018-06-06spring 5.x整合mybatis3.x使用的是阿里的druid数据连接池
85.88MB
官方原版spring-framework-5.0.5.RELEASE.rar
2018-04-04官方原版spring-framework-5.0.5.RELEASE.rar
394.75MB
Spring 5 开发大全,完整扫描版
2019-02-01【作为全网第一本spring5,如果你是外行人,你看不懂肯定会说他凑字数,我之前了解过spring相关知识,我看这本书的时候就觉得比较好,理论和实战相结合,能让我更快速地了解知识点。】自 Spring
30.74MB
Spring5整合mybatis3
2018-11-14Spring5整合mybatis3,Spring5整合mybatis3 版本: JDK8 Tomcat9 MySQL8
4.23MB
spring5个 jar
2012-06-06spring5个 jar
17.98MB
Shiro + Hibernate5 + Spring5 + SpringMVC5 的jar
2017-12-22Shiro + Hibernate5 + Spring5 + SpringMVC5 的jar 的架包!
50KB
Spring-Data-Redis2.0+Spring5
2017-11-24Spring-Data-Redis2.0整合Spring5的cachemanage例子,JDK要1.8,maven3.5吧。文档地址:http://blog.csdn.net/u011189939/a
9.7MB
Appress Pro Spring 5.pdf
2018-11-06Spring最新版本的pdf格式电子书,喜欢看英文原版电子书的的朋友可以下载看看
356.73MB
SPRING5高级编程
2019-01-29spring5高级编程完整版带书签
74.52MB
最新版spring 5.05下载
2018-04-14spring 最新版 5 5.05 jar包 spring框架 (spring-framework-5.0.5.RELEASE-dist .zip)
46.79MB
spring3.0.5官方完整版
2013-10-01刚刚要找这个版本的spring,因为在官方上一直找不到链接。网上很多都是部分的,要么只是文档,要么只是一些jar包,都不完整,刚看到一个人的博客里面有这个,看一下大小就知道是完整的,打开一看果然没让我
-
博客
leetcode 26, leetcode 27,leetcode 283
leetcode 26, leetcode 27,leetcode 283
-
下载
HDTune_Pro_v5_6.zip
HDTune_Pro_v5_6.zip
-
下载
海思系列非高安芯片机顶盒DIY解包打包签名工具.rar
海思系列非高安芯片机顶盒DIY解包打包签名工具.rar
-
博客
蓝桥11
蓝桥11
-
学院
性能测试面面观
性能测试面面观
-
下载
小米note维修原理图PCB位置图(PDF格式)
小米note维修原理图PCB位置图(PDF格式)
-
学院
2021最新Kubernetes(k8s)集群实战精讲
2021最新Kubernetes(k8s)集群实战精讲
-
博客
2021-01-23 搜索
2021-01-23 搜索
-
学院
ProBuilder快速原型开发技术
ProBuilder快速原型开发技术
-
博客
养生不分年纪,疾病只看身体。
养生不分年纪,疾病只看身体。
-
学院
android笔试面试和实战课程
android笔试面试和实战课程
-
博客
SpringMVC mybatis报错
SpringMVC mybatis报错
-
下载
《零起点TF与量化交易》源码.rar
《零起点TF与量化交易》源码.rar
-
下载
c++ STL阐述了各种查找算法的异同以及使用他们的时机
c++ STL阐述了各种查找算法的异同以及使用他们的时机
-
下载
Xdebug helper.zip
Xdebug helper.zip
-
学院
uni-app实战专题
uni-app实战专题
-
博客
(DTD)DTD快速入门
(DTD)DTD快速入门
-
下载
基于51的NRF24L01通信实验.zip
基于51的NRF24L01通信实验.zip
-
博客
python的变量缓存机制
python的变量缓存机制
-
学院
WPF上位机数据采集与监控系统零基础实战
WPF上位机数据采集与监控系统零基础实战
-
下载
windows下和unix linux下按enter回车的区别 记事本打开文件显示黑方块的原因.zip
windows下和unix linux下按enter回车的区别 记事本打开文件显示黑方块的原因.zip
-
下载
webcrawlingNotes.pdf
webcrawlingNotes.pdf
-
学院
JavaEE框架(Maven+SSM)全程实战开发教程(源码+讲义)
JavaEE框架(Maven+SSM)全程实战开发教程(源码+讲义)
-
学院
【数据分析实战训练营】Hive详解
【数据分析实战训练营】Hive详解
-
博客
数据结构--数组+链表实现哈希表
数据结构--数组+链表实现哈希表
-
下载
Java基础知识加进阶知识
Java基础知识加进阶知识
-
学院
算法导论二(排序和顺序统计量)——编程大牛的必经之路
算法导论二(排序和顺序统计量)——编程大牛的必经之路
-
下载
C语言的异常处理和C++的异常处理有何区别?
C语言的异常处理和C++的异常处理有何区别?
-
学院
MFC开发简单聊天程序
MFC开发简单聊天程序
-
下载
小米平板1维修原理图PCB位置图(PDF格式)
小米平板1维修原理图PCB位置图(PDF格式)