JavaEE 開發的顛覆者: Spring Boot實戰 JavaEE开发的颠覆者: Spring Boot实战

汪雲飛

  • 出版商: 電子工業出版社
  • 出版日期: 2016-03-01
  • 售價: $534
  • 貴賓價: 9.5$507
  • 語言: 簡體中文
  • 頁數: 524
  • 裝訂: 平裝
  • ISBN: 7121282089
  • ISBN-13: 9787121282089
  • 相關分類: Java 相關技術
  • 銷售排行: 👍 2016 年度 簡體中文書 銷售排行 第 10 名

立即出貨

買這商品的人也買了...

相關主題

20190122 %e7%b0%a1%e9%ab%94%e6%9b%b8s

商品描述

<內容>

在當今Java EE開發中,Spring框架是當之無愧的王者。而Spring Boot是Spring主推的基於“習
慣優於配置”的原則,讓你能夠快速搭建應用的框架,從而使得Java EE開髮變得異常簡單。
本書從Spring基礎、Spring MVC基礎講起,從而無難度地引入Spring Boot的學習。涵蓋使用
Spring Boot進行Java EE開發的絕大數應用場景,包含:Web開發、數據訪問、安全控制、批處理、
異步消息、系統集成、開發與部署、應用監控、分佈式系統開發等。
當你學完本書後,你將能使用Spring Boot解決Java EE開發中所遇到的絕大多數問題。

<目錄>


第1章Spring基礎..................................... .................................................. ...................... 2 
1.1 Spring概述........................ .................................................. ....................................... 2 
1.1.1 Spring的簡史... .................................................. ............................................. 2 
1.1.2 Spring概述................................................. .................................................. ... 3 
1.2 Spring項目快速搭建......................................... .................................................. ...... 5 
1.2.1 Maven簡介...................................... .................................................. .............. 6 
1.2.2 Maven安裝.............................. .................................................. ...................... 6 
1.2.3 Maven的pom.xml ................... .................................................. ...................... 7 
1.2.4 Spring項目的搭建.................... .................................................. .................... 9 
1.3 Spring基礎配置......................... .................................................. ............................ 17 
1.3.1依賴註入................ .................................................. ...................................... 18 
1.3.2 Java配置...... .................................................. ................................................ 21 
1.3 .3 AOP ............................................... .................................................. ............... 24 
第2章Spring常用配置............................ .................................................. ...................... 30 
2.1 Bean的Scope ....................... .................................................. .................................. 30 
2.1.1點睛........... .................................................. .................................................. . 30 
2.1.2示例............................................ .................................................. .................. 31 
2.2 Spring EL和資源調用......................... .................................................. ................... 33 
目錄∣ VII 
2.2.1點睛....................... .................................................. ....................................... 33 
2.2.2示例...... .................................................. .................................................. ...... 33 
2.3 Bean的初始化和銷毀..................................... .................................................. ....... 37 
2.3.1點睛...................................... .................................................. ........................ 37 
2.3.2演示..................... .................................................. ......................................... 38 
2.4 Profile ...... .................................................. .................................................. .............. 40 
2.4.1點睛............................... .................................................. ............................... 40 
2.4.2演示.............. .................................................. ................................................ 41 
2.5事件(Application Event) ............................................. ......................................... 44 
2.5.1點睛.... .................................................. .................................................. ........ 44 
2.5.2示例..................................... .................................................. ......................... 44 
第3章Spring高級話題.................. .................................................. ................................ 48 
3.1 Spring Aware .............. .................................................. ............................................. 48 
3.1.1點睛.................................................. .................................................. ............ 48 
3.1.2示例................................. .................................................. ............................. 49 
3.2多線程................. .................................................. .................................................. .. 51 
3.2.1點睛........................................... .................................................. ................... 51 
3.2.2示例.......................... .................................................. .................................... 51 
3.3計劃任務.......... .................................................. .................................................. ..... 54 
3.3.1點睛........................................ .................................................. ...................... 54 
3.3.2示例....................... .................................................. ....................................... 54 
3.4條件註解@Conditional ..... .................................................. ..................................... 56 
3.4.1點睛........ .................................................. .................................................. .... 56 
3.4.2示例......................................... .................................................. ..................... 57 
3.5組合註解與元註解...................... .................................................. ........................... 60 
3.5.1點睛.................. .................................................. ............................................ 60 
3.5.2示例. .................................................. .................................................. ........... 60 
3.6 @Enable*註解的工作原理.............................. .................................................. ...... 63 
3.6.1第一類:直接導入配置類................................ ............................................ 63 
3.6.2第二類:依據條件選擇配置類........................................... ......................... 64 
3.6.3第三類:動態註冊Bean .............. .................................................. ............... 65 
VIII ∣ Java EE開發的顛覆者:Spring Boot實戰
3.7測試.................... .................................................. .................................................. ... 66 
3.7.1點睛.......................................... .................................................. .................... 66 
3.7.2示例......................... .................................................. ..................................... 67 
第二部分點睛Spring MVC 4.x 
第4章Spring MVC基礎............................................... .................................................. . 72 
4.1 Spring MVC概述............................................ .................................................. ....... 73 
​​4.2 Spring MVC項目快速搭建.................................... ................................................. 74 
4.2.1點睛.............................................. .................................................. ................ 74 
4.2.2示例............................. .................................................. ................................. 74 
4.3 Spring MVC的常用註解.......... .................................................. ............................. 82 
4.3.1點睛................ .................................................. .............................................. 82 
4.3.2示例................................................. .................................................. ............. 83 
4.4 Spring MVC基本配置............................... .................................................. ............ 87 
4.4.1靜態資源映射............................... .................................................. ............... 88 
4.4.2攔截器配置............................ .................................................. ...................... 89 
4.4.3 @ControllerAdvice ...................... .................................................. ................ 91 
4.4.4其他配置............................ .................................................. .......................... 94 
4.5 Spring MVC的高級配置................. .................................................. ...................... 98 
4.5.1文件上傳配置..................... .................................................. ......................... 98 
4.5.2自定義HttpMessageConverter .................. .................................................. 101 
4.5.3服務器端推送技術.......................................... ............................................ 106 
4.6 Spring MVC的測試.................................................. ............................................. 113 
4.6.1點睛.................................................. .................................................. .......... 113 
4.6.2示例................................... .................................................. ......................... 114 
第三部分實戰Spring Boot 
第5章Spring Boot基礎............ .................................................. ................................... 122 
5.1 Spring Boot概述.......... .................................................. ......................................... 122 
5.1.1什麼是Spring Boot . .................................................. ................................... 122 
目錄∣ IX 
5.1.2 Spring Boot核心功能.... .................................................. ............................ 122 
5.1.3 Spring Boot的優缺點............. .................................................. ................... 124 
5.1.4關於本書的Spring Boot版本.................... ................................................. 124 
5.2 Spring Boot快速搭建............................................. ................................................ 124 
5.2 .1 http://start.spring.io ....................................... ................................................ 124 
5.2 .2 Spring Tool Suite ............................................. ............................................. 127 
5.2.3 IntelliJ IDEA ................................................. ............................................... 129 
5.2. 4 Spring Boot CLI .............................................. ............................................. 132 
5.2.5 Maven手工構建................................................ .......................................... 134 
5.2.6簡單演示.. .................................................. .................................................. 136 
第6章Spring Boot核心........................................... .................................................. .... 138 
6.1基本配置.......................................... .................................................. ..................... 138 
6.1.1入口類和@SpringBootApplication .................... ......................................... 138 
6.1.2關閉特定的自動配置.................................................. ................................ 139 
6.1.3定製Banner ............ .................................................. ................................... 139 
6.1.4 Spring Boot的配置文件...... .................................................. ...................... 140 
6.1.5 starter pom ...................... .................................................. ............................ 141 
6.1.6使用xml配置............... .................................................. ............................. 143 
6.2外部配置................. .................................................. .............................................. 143 
6.2.1命令行參數配置.............................................. ............................................ 143 
6.2.2常規屬性配置................................................. ............................................. 144 
6.2.3類型安全的配置(基於properties) ........................................... .............. 145 
6.3日誌配置................................ .................................................. ............................... 148 
6.4 Profile配置............... .................................................. ............................................ 148 
實戰.... .................................................. .................................................. .................. 148 
6.5 Spring Boot運行原理.......................... .................................................. ................. 150 
6.5.1運作原理........................... .................................................. ......................... 153 
6.5.2核心註解................... .................................................. ................................. 154 
6.5.3實例分析........... .................................................. ......................................... 157 
6.5.4實戰.... .................................................. .................................................. ...... 160 
X ∣ Java EE開發的顛覆者:Spring Boot實戰
第7章Spring Boot的Web開發....................... .................................................. ........... 170 
7.1 Spring Boot的Web開發支持............................... ................................................ 170 
7.2 Thymeleaf模板引擎............................................... ................................................ 171 
7.2 .1 Thymeleaf基礎知識............................................. ....................................... 171 
7.2.2與Spring MVC集成... .................................................. .............................. 174 
7.2.3 Spring Boot的Thymeleaf支持........... .................................................. .... 175 
7.2.4實戰......................................... .................................................. ................... 177 
7.3 Web相關配置.......................... .................................................. ............................. 182 
7.3.1 Spring Boot提供的自動配置........... .................................................. ......... 182 
7.3.2接管Spring Boot的Web配置............................... ..................................... 185 
7.3.3註冊Servlet、Filter、Listener ... .................................................. ............... 186 
7.4 Tomcat配置............................... .................................................. ........................... 187 
7.4.1配置Tomcat ................. .................................................. .............................. 187 
7.4.2代碼配置Tomcat ............. .................................................. .......................... 188 
7.4.3替換Tomcat .................. .................................................. ............................. 190 
7.4.4 SSL配置............... .................................................. ..................................... 191 
7.5 Favicon配置......... .................................................. ................................................ 196 
7.5 .1默認的Favicon ............................................. ............................................... 196 
7.5. 2關閉Favicon ............................................... ................................................. 196 
7.5.3設置自己的Favicon ........................................... ......................................... 197 
7.6 WebSocket ...... .................................................. .................................................. ..... 197 
7.6.1什麼是WebSocket ...................................... ................................................. 197 
7.6.2 Spring Boot提供的自動配置......................................... ............................. 197 
7.6.3實戰................ .................................................. ............................................ 198 
7.7基於Bootstrap和AngularJS的現代Web應用.............................................. ...... 212 
7.7.1 Bootstrap ....................................... .................................................. ............. 213 
7.7.2 AngularJS ................................ .................................................. ................... 216 
7.7.3實戰.......................... .................................................. .................................. 222 
第8章Spring Boot的數據訪問....... .................................................. ............................. 233 
8.1引入Docker ................. .................................................. ......................................... 237 
8.1.1 Docker的安裝.. .................................................. ......................................... 238 
目錄∣ XI 
8.1.2 Docker常用命令及參數............................................... .............................. 242 
8.1.3下載本書所需的Docker鏡像........ .................................................. .......... 247 
8.1.4異常處理.................................. .................................................. .................. 247 
8.2 Spring Data JPA ........................... .................................................. ......................... 248 
8.2.1點睛Spring Data JPA ................. .................................................. ................ 248 
8.2.2 Spring Boot的支持.......................... .................................................. .......... 258 
8.2.3實戰................................... .................................................. ......................... 260 
8.3 Spring Data REST .................... .................................................. ............................. 284 
8.3.1點睛Spring Data REST ............. .................................................. ................ 284 
8.3.2 Spring Boot的支持.......................... .................................................. .......... 285 
8.3.3實戰................................... .................................................. ......................... 286 
8.4聲名式事務.................... .................................................. ....................................... 297 
8.4.1 Spring的事務機制... .................................................. ................................. 297 
8.4.2聲名式事務.......... .................................................. ...................................... 298 
8.4.3註解事務行為..... .................................................. ....................................... 299 
8.4.4類級別使用@Transactional .. .................................................. ..................... 300 
8.4.5 Spring Data JPA的事務支持................... .................................................. .. 300 
8.4.6 Spring Boot的事務支持....................................... ....................................... 302 
8.4.7實戰...... .................................................. .................................................. .... 303 
8.5數據緩存Cache ......................................... .................................................. ........... 309 
8.5.1 Spring緩存支持................................ .................................................. ........ 309 
8.5.2 Spring Boot的支持.................................. .................................................. .. 310 
8.5.3實戰........................................... .................................................. ................. 312 
8.5.4切換緩存技術.......................... .................................................. .................. 319 
8.6非關係型數據庫NoSQL ......................... .................................................. ............. 320 
8.6.1 MongoDB ................................ .................................................. ................... 320 
8.6.2 Redis .......................... .................................................. ................................. 329 
第9章Spring Boot企業級開發........ .................................................. ............................ 340 
9.1安全控制Spring Security ................ .................................................. ..................... 340 
9.1.1 Spring Security快速入門..................... .................................................. ..... 340 
9.1.2 Spring Boot的支持..................................... ................................................. 347 
XII ∣ Java EE開發的顛覆者:Spring Boot實戰
9.1.3實戰.................................. .................................................. .......................... 348 
9.2批處理Spring Batch .................. .................................................. ........................... 362 
9.2.1 Spring Batch快速入門............... .................................................. ............... 362 
9.2.2 Spring Boot的支持........................... .................................................. ......... 370 
9.2.3實戰.................................... .................................................. ........................ 371 
9.3異步消息...................... .................................................. ......................................... 385 
9.3.1企業級消息代理. .................................................. ....................................... 386 
9.3.2 Spring的支持.... .................................................. ........................................ 386 
9.3.3 Spring Boot的支持.. .................................................. .................................. 386 
9.3.4 JMS實戰.......... .................................................. .......................................... 387 
9.3.5 AMQP實戰.. .................................................. ............................................. 391 
{ "@context": "http://schema.org", "@type": "Book", "additionalType": "Product", "url": "https://www.tenlong.com.tw/products/9787121282089", "name": "JavaEE 開發的顛覆者: Spring Boot實戰", "author": "汪雲飛", "inLanguage": "Chinese", "isbn": "7121282089", "publisher": "電子工業出版社", "datePublished": "2016-03-01", "image": "https://cf-assets2.tenlong.com.tw/products/images/000/091/940/original/51iOifJaPGL.jpg?1525618306", "offers": { "@type": "Offer", "availability": "http://schema.org/InStock", "price": "507", "priceCurrency": "TWD" } }