您好,欢迎光临本网站![请登录][注册会员]  
文件名称: spring-boot官方学习文档
  所属分类: Java
  开发工具:
  文件大小: 12mb
  下载次数: 0
  上传时间: 2019-09-04
  提 供 者: weixin_********
 详细说明:此文档为SpringBoot-2.0.0-M5官方学习指导文档,文档未翻译为英文文档3.1.1. Dependency management 20 3.1.2. Maven b·6鲁鲁。 ,,,,,,,,,,,,,,,,,,,,∴20 Inheriting the Starter Parent 21 Using Spring Boot without the Parent POM 21 USing the Spring Boot Maven Plugin ,,,,,,,,,,,,,,,,,,,,,22 3.1.3. Gradle ....23 3.1.4.Ant,,,,, 23 3.1.5. Starters,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 3.2. Structuring Your Code 49 321. Using the“ default” Package. 非。鲁,。 29 3.2.2. Locating the Main Application Class 29 3.3. Configuration Classes ,31 3.3.1. Importing Additional Configuration Classes........,.. 31 3.3.2. Importing XML Configuration ........31 3.4. Auto-configuration.…,…,……,…,,…,31 3.4.1. Gradually replacing Auto-contiguration .31 3.4.2. Disabling Specific Auto-configuration Classes 32 3.5. Spring Beans and Dependency Injection 鲁自 32 3.6. Using the Spring BootApplication annotation ..,....33 3.7. Running Your Application,……, ,,,,,,,,,,,,,,,,,,35 371. Running from an IDE..…,… ,,.,..35 3.7.2. Running as a Packaged Application 36 3.7.3. Using the Maven Plugin...,.......... ,4鲁垂 36 3.7.4. Using the Gradle plugin 36 3.7.5. Hot Swapping.……∴…∴…∴ ...37 3.8. Developer tools ,,,37 3.8.1. Property Defaults 38 3.8.2. Automatic restart ··.·:.···.:..··.:·.· 38 ,ogging changes in condition evaluation 40 Excluding resources 40 Watching Additional Paths 。 40 Disabling restart ...,40 Using a Trigger File 41 Customizing the restart Classloader ....,,,..41 Known limitations 42 3.8.3. Livereload.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 42 3.8.4. Global Settings. .42 38.5. Remote applications∴……… ,,,42 Running the remote client Application 43 Remote Update........ 44 3.9. Packaging Your Application for Production............ ,,,,,,,,,45 3. 10. What to read next 45 4. Spring Boot Features..….………………………,………,46 4.1. Spring Application 46 4.1.1. Startup Failure ,,,,,,,,,,,,,,,,,47 4.1.2. Lazy Initialization ,,,,,,,,,,,,,,,,,,,,,47 4. 1.3. Customizing the Banner .48 4.14. Customizing SpringApplication.…… 49 4.1.5. Fluent builder api,.,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,.,49 4.1.6. Application Events and Listeners .50 4.1.7. Web environment 非。鲁,。 51 4.1.8. Accessing Application Arguments 51 4.1.9. Using the ApplicationRunner or CommandLinerunner ,52 4.1.10. Application Exit 53 4.1.11. Admin features .53 4.2. Externalized Configuration.…,,,…,,…,,…,,…,…,,….53 4.2.1. Configuring random values .55 4.2. 2 Accessing Command Line Properties 56 4.2.3. Application Property Files 鲁自 56 4.2.4. Profile-specific Properties ..,,...58 4.2.5. Placeholders in Properties ,,,,,58 4.2.6. Encrypting Properties,∴…… ,.,..58 4.2.7. Using YAML Instead of Properties.......... ,,,,,59 Loading YAMl 垂鲁D着 ,,,,,59 Exposing YAML as Properties in the Spring environment ..60 Multi-profile YAML Documents ,60 YAML Shortcomings ·t,自 ,,,,,,,,,..61 4.2.8. Type-safe Configuration Properties 62 JavaBean properties binding∴…………,, 62 Constructor binding 64 Enabling gConfigurationProperties-annotated types............ ,,,65 Using ConfigurationProperties-annotated types 。 66 Third-party Configuration ....67 Relaxed binding∴.,… 68 Merging Complex types ........69 Properties Conversion 71 Configuration Properties Validation.........,.......... ConfigurationProperties vs value 76 4.3. Profiles..,,,,,,,,,,, 0800 0 76 4.3.1. Adding Active Profiles 77 4.3.2. Programmatically Setting Profiles 77 4.3.3. Profile-specific Configuration Files ,,,,,,,,78 4.4. Logging 78 4.4.1. Log Format....,..,..,…,..,,,.78 4.4.2. Console Output 79 Color-coded Output 79 4.4.3. File Output ,,,,,,,,,,,,,,,,,,,,,,,,80 4.4.4. Log Levels 81 4.4.5. Log Groups..… 81 46. Custom Log Configuration∴… ,,,,,,,,,,,,,.82 4.4.7. Logback Extensions ..,,,..84 Profile-specific Configuration........,...,.. 非。鲁,。 84 Environment Properties 85 4.5. Internationalization ,,,,,85 4.6. SON 86 4.6.1. Jackson .86 4.6.2.Gson. 86 46.3. JSoN-B.……… .86 4.7. Developing Web Applications... 86 4.7.1.The“ Spring Web MvC Framework” 鲁,自 87 Spring Mvc Auto-configuration ..,....87 Httpmessage Converters ,,,,,,,,,,,,,,,,,88 Custom SoN Serializers and deserializers ,,..88 Message CodesResolver ,,,,,89 Static content ,,,,,,,,,,,89 Welcome Page 91 Custom favicon...,,,,,,,,,,,,,,,,,,,,,,,,,,, ,91 Path matching and Content Negotiation ,,,,,91 Configurable Web BindingInitializer 92 Template Engines................. ∴,,,,,,,,92 Error Handling 93 Spring hateOas 96 CORS Support. 。.面 97 4.7.2. The "Spring WebFlux Framework ....97 Spring web Flux auto-configuration 100 Http Codecs with Httpmessage Readers and HttpmessagewrIters 100 Static content .,101 Template engines.,,…… ,,.101 Error handling ...101 Web filters.,,,,,,,,,,,,, 103 4.7.3. JAX-RS and jersey. 103 4.7.4. Embedded Servlet Container Support ..104 Servlets Filters, and listeners ,,,,,,,,,,104 Servlet context initialization 105 The ServletWebServerApplication Context∴… 105 Customizing Embedded Servlet Containers 106 JSP LImitations..… ,.,107 4.7.5. Embedded Reactive Server Support ,,,,,,,,,,108 4.7.6. Reactive Server Resources Configuration 108 4.8. RSocket..,,,,,,,,,,,,,,,,,,,,,, ∴.,,,,,,,,,,,,,108 4.8.1. RSocket Strategies Auto-contiguration....................... 109 4.8.2. RSocket server Auto-configuration ...109 4.8.3. Spring Messaging RSocket support........................ 110 4.8.4. Calling RSocket Services with RSocketRequester .110 4.9. Security.…………,… ,,,,,,,,,,111 4.9.1. MVC Security.∴ ,,,,,,,,,,,,,,,,,,,112 4.9.2. WebFlux Security 112 4.9.3.0Auth2,,,,,,,,,,,,,,,,,,,,,,,,,,,113 Client 113 Resource server,,,,,,,,,,,,,,,,,,,,,,,,,, n,,115 Authorization server 116 4.9.4. Actuator security 116 Cross Site Request Forgery Protection ,,,117 4.10. Working with SQL Databases ,,,,,,,,,,,,,,,,,,.,117 4.10.1. Configure a Data Source 117 Embedded Database Support.....,......... 117 Connection to a production database 118 Connection to a NDI Data Source..…… 119 4.10.2. Using jdbcTemplate 120 4.10.3. JPA and Spring Data JPA ..120 Entity Classes 121 Spring Data Pa Repositories 122 Creating and Dropping PA Databases ,123 Open Entity Manager in view 124 4.10.4. Spring Data DBC ...124 4.10.5. Using H2's Web Console 124 Changing the H2 Console's Path .·. 125 4.10.6. Using jo0Q..... 125 Code generation.,,,,,,,,,,,,,,,,,,,,,,125 Using dslcontext ...125 jOOQ SQL Dialect.…..… 126 Customizing jooQ ...126 4.11. Working with NosQL Technologies ..127 4.11.1. Redis,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,127 Connecting to Redis......... ...127 4.11.2. MongoDB 。垂 128 Connecting to a MongoDB Database 128 MongoTemplat ,.,129 Spring Data MongoDB Repositories........... ,,,,,,,,,130 Embedded mongo 130 4.113.Neo4j, 鲁鲁看 ,,,,,,,,,,,,,,,131 Connecting to a Neo4j Database.......... ..131 Using the Embedded Mode 131 Using Native types,… ,,,,,,,,,,,,,,,,,,,,,,,,,,132 Neo4jSession 132 Spring Data Neo4 j Repositories.……, ,,,,,,,,,,,,..132 4. 4. Gemfire ,,,,,,,,,,,133 4.11.5.Solr.. 133 Connecting to Solr.………… .,133 Spring Data Solr repositories 134 4.11.6. Elasticsearch,,,,,,,,,,,,,, n,,134 Connecting to Elasticsearch using RESt clients 134 Connecting to Elasticsearch using Reactive REST clients 135 Connecting to Elasticsearch using jest ,,,,,,,,,,,135 Connecting to Elasticsearch by Using Spring Data................... 136 Spring Data Elasticsearch Repositories............ 137 4.11.7. Cassandra.,,,.137 Connecting to Cassandra 137 Spring Data Cassandra Repositories...... ,138 4.118 Couchbase 138 Connecting to Couchbase ..138 Spring data Couchbase repositories.…………… .139 4.11.9.LDAP......., ..140 Connecting to an LDAP Server 140 Spring Data LDAP Repositories 140 Embedded In-memory LDAP Server .....141 4.11.10. InfluxDE..., 142 Connecting to InfluxDB .·. 142 4.12. Caching 142 4.12.1. Supported Cache Providers.,…………………143 Generic 144 j Cache(SR-107),∴…,,,, 144 EhCache 2.x 145 Hazelcast ..145 Infinispan..,.,,,,,..,.146 Couchbase 146 Redis 。垂 147 Caffeine 148 Simple ,.,148 None ,,,,,,,,,,148 4.13. Messaging 149 4.131.JMS.… 149 ActiveMQ Support. ..149 Artemis Support..... 150 Using a NDI ConnectionFactory.……………………………………………………………151 Sending a message 151 Receiving a message ,,,,,,,,,,,,,,,152 4.132.AMQP ,,,,,,,153 RabbitMQ support 153 Sending a message.......... 154 Receiving a message 155 4. 13.3. Apache Kafka Support... .,156 Sending a Message..,,,,,,,,,,…,…, 157 Receiving a Message 157 Kafka streams..……… ,,,158 Additional Kafka Properties∴……………,………159 Testing with Embedded Kafka................... 160 4.14. Calling Rest Services with RestTemplate 量鲁鲁 161 4.14.1. RestTemplate customization ..161 4.15. Calling rest Services with WebClient 162 4.15.1, Web Client runtime 163 4.15.2. Web Client customization ..163 4.16. Validation,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 164 4.17. Sending Email. ..164 4.18. Distributed Transactions with TA .,165 4.18.1. Using an Atomikos Transaction Manager 165 4.18.2. Using a Bitronix Transaction Manager .....165 4.18.3. Using a Java EE Managed Transaction Manager 166 4.18.4. Mixing XA and Non-XA JMS Connections. .·. 166 4.18.5. Supporting an Alternative Embedded Transaction Manager 167 4.19. Hazelcast 167 4.20. Quartz Scheduler ...168 4.21. Task Execution and scheduling.…… 169 4.22. Spring Integration 170 4.23. Spring Session............ 171 4.24. Monitoring and management over JMX..……………………………171 4.25. Testing 172 4.25.1. Test Scope Dependencies.………………………………….172 4. 2. Testing Spring Applications 172 4. 25.3. Testing Spring Boot Applications ,.,173 Detecting Web Application Type ,,,,,,,,174 Detecting Test Configuration 174 Excluding Test Configuration ,,,,,,,,,,,,,175 Using Application Arguments 175 Testing with a mock environment 176 Testing with a running server∴∴ ,,,,,,,,,,,,,,,,,,,,,,177 Using JMX.……………… .178 Mocking and Spying beans∴…;… ,,,,,,,,,,,,,,179 Auto-configured Tests ....181 Auto-configured SoN Tests 181 Auto- configured Spring MVC Tests,…,…………………….183 Auto-configured Spring WebFlux Tests 185 Auto-configured Data JPA Tests ,,187 Auto-configured JDBC Tests 188 Auto-configured Data JDBC Tests 189 Auto-configured jooQ Tests ∴,,,,,,,,,,,,,,.189 Auto-configured Data MongoDB Tests ,,,,,,,,,,,,,,,,,,,,190 Auto-configured Data Neo4j Tests 191 Auto-configured Data Redis Tests.................,......... 192 Auto-configured Data LDAP Tests 192 Auto-configured REST Clients.....,.........,... ,193 Auto-configured Spring rest docs tests 194 Additional Auto-configuration and Slicing ..198 User Configuration and Slicing 198 Using Spock to Test Spring Boot Applications 200 4.25.4, Test utillities 200 Config Fileapplication contextinitializer 200 TestProperty values 200 putcaptu TestRestTemplate.…… 201 4.26. Web Sockets 203 4.27. Web services..,,,,,,,,,,,,,, ...203 4.27.1. Calling Web Services with WebServiceTemplate ...203 4.28. Creating Your own auto-configuration 204 4.28.1. Understanding Auto-configured Beans 204 4.28.2. Locating Auto-configuration Candidates ..205 4.28.3. Condition annotations,,,,,,,,,,,,,,,,,,,,,,,,,,,,,205 Class Conditions ..206 Bean conditions.,,,,,,,,,,,,,,,,,,,,,, 。垂 206 Property Conditions 207 Resource Conditions ..,.,207 Web application Conditions ,,,,,,,,207 SpEL Expression conditions 207 4.28.4. Testing your Auto-configuration .,,,,,.,,,.208 Simulating a web Context ...209 Overriding the Classpath ...209 4.28.5. Creating Your Own Starter,……,……209 Naming∴…………… .210 Configuration keys ,,,,..,,,,,.210 autoconfigure module ......211 Starter module ..212 4.29. Kotlin support..…,…,, 212 4.29.1. Requirements 212 4.29.2. Null-safety.............. .,212 4. 29.3. Kotlin api 213 runApplication ..213 Extensions,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,213 4. 29.4. Dependency management.. 214 4.29.5. Configuration Properties...... ,214 4.29.6. Testing..………………………………,,…,……,…214 4.29.7. Resources.....,.. ..215 Further reading.... ,215 Examples... ,,,,,215 430. What to read next ..215 5. Spring Boot Actuator: Production-ready Features ,216 5.1. Enabling Production-ready features ..216 5.2. Endpoints 216 5.2.1. Enabling Endpoints 218 5.2.2. Exposing Endpoints ....218 5.2.3. Securing Http Endpoints 220 5.2.4. Configuring Endpoints .·. 221 5.2.5. Hypermedia for Actuator Web Endpoints 222 5.2.6. CORS Support∴∴……… ..222 5.2.7. Implementing Custom Endpoints 222 Receiving Input.…… 223 Custom Web Endpoints .223 Servlet endpoints ..225 Controller endpoints................................ 225
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: springboot学习文档
 输入关键字,在本站1000多万海量源码库中尽情搜索: