On this page
Spring Boot Reference Guide
Authors
Phillip Webb, Dave Syer, Josh Long, Stéphane Nicoll, Rob Winch, Andy Wilkinson, Marcel Overdijk, Christian Dupuis, Sébastien Deleuze, Michael Simons1.5.9.RELEASE
Copyright © 2012-2017
Table of Contents
- I. Spring Boot Documentation
- II. Getting started
- III. Using Spring Boot
-
- 13. Build systems
- 14. Structuring your code
- 15. Configuration classes
- 16. Auto-configuration
- 17. Spring Beans and dependency injection
- 18. Using the @SpringBootApplication annotation
- 19. Running your application
- 20. Developer tools
- 21. Packaging your application for production
- 22. What to read next
- IV. Spring Boot features
-
- 23. SpringApplication
-
- 23.1. Startup failure
- 23.2. Customizing the Banner
- 23.3. Customizing SpringApplication
- 23.4. Fluent builder API
- 23.5. Application events and listeners
- 23.6. Web environment
- 23.7. Accessing application arguments
- 23.8. Using the ApplicationRunner or CommandLineRunner
- 23.9. Application exit
- 23.10. Admin features
- 24. Externalized Configuration
- 25. Profiles
- 26. Logging
- 27. Developing web applications
-
- 27.1. The ‘Spring Web MVC framework’
-
- 27.1.1. Spring MVC auto-configuration
- 27.1.2. HttpMessageConverters
- 27.1.3. Custom JSON Serializers and Deserializers
- 27.1.4. MessageCodesResolver
- 27.1.5. Static Content
- 27.1.6. Custom Favicon
- 27.1.7. ConfigurableWebBindingInitializer
- 27.1.8. Template engines
- 27.1.9. Error Handling
- 27.1.10. Spring HATEOAS
- 27.1.11. CORS support
- 27.2. JAX-RS and Jersey
- 27.3. Embedded servlet container support
- 28. Security
- 29. Working with SQL databases
- 30. Working with NoSQL technologies
- 31. Caching
- 32. Messaging
- 33. Calling REST services
- 34. Validation
- 35. Sending email
- 36. Distributed Transactions with JTA
- 37. Hazelcast
- 38. Spring Integration
- 39. Spring Session
- 40. Monitoring and management over JMX
- 41. Testing
-
- 41.1. Test scope dependencies
- 41.2. Testing Spring applications
- 41.3. Testing Spring Boot applications
-
- 41.3.1. Detecting test configuration
- 41.3.2. Excluding test configuration
- 41.3.3. Working with random ports
- 41.3.4. Mocking and spying beans
- 41.3.5. Auto-configured tests
- 41.3.6. Auto-configured JSON tests
- 41.3.7. Auto-configured Spring MVC tests
- 41.3.8. Auto-configured Data JPA tests
- 41.3.9. Auto-configured JDBC tests
- 41.3.10. Auto-configured Data MongoDB tests
- 41.3.11. Auto-configured REST clients
- 41.3.12. Auto-configured Spring REST Docs tests
- 41.3.13. User configuration and slicing
- 41.3.14. Using Spock to test Spring Boot applications
- 41.4. Test utilities
- 42. WebSockets
- 43. Web Services
- 44. Creating your own auto-configuration
- 45. What to read next
- V. Spring Boot Actuator: Production-ready features
-
- 46. Enabling production-ready features
- 47. Endpoints
- 48. Monitoring and management over HTTP
-
- 48.1. Accessing sensitive endpoints
- 48.2. Customizing the management endpoint paths
- 48.3. Customizing the management server port
- 48.4. Configuring management-specific SSL
- 48.5. Customizing the management server address
- 48.6. Disabling HTTP endpoints
- 48.7. HTTP health endpoint format and access restrictions
- 49. Monitoring and management over JMX
- 50. Monitoring and management using a remote shell (deprecated)
- 51. Loggers
- 52. Metrics
-
- 52.1. System metrics
- 52.2. DataSource metrics
- 52.3. Cache metrics
- 52.4. Tomcat session metrics
- 52.5. Recording your own metrics
- 52.6. Adding your own public metrics
- 52.7. Special features with Java 8
- 52.8. Metric writers, exporters and aggregation
- 52.9. Aggregating metrics from multiple sources
- 52.10. Dropwizard Metrics
- 52.11. Message channel integration
- 53. Auditing
- 54. Tracing
- 55. Process monitoring
- 56. Cloud Foundry support
- 57. What to read next
- VI. Deploying Spring Boot applications
- VII. Spring Boot CLI
-
- 61. Installing the CLI
- 62. Using the CLI
- 63. Developing application with the Groovy beans DSL
- 64. Configuring the CLI with settings.xml
- 65. What to read next
- VIII. Build tool plugins
-
- 66. Spring Boot Maven plugin
- 67. Spring Boot Gradle plugin
-
- 67.1. Including the plugin
- 67.2. Gradle dependency management
- 67.3. Packaging executable jar and war files
- 67.4. Running a project in-place
- 67.5. Spring Boot plugin configuration
- 67.6. Repackage configuration
- 67.7. Repackage with custom Gradle configuration
- 67.8. Understanding how the Gradle plugin works
- 67.9. Publishing artifacts to a Maven repository using Gradle
- 68. Spring Boot AntLib module
- 69. Supporting other build systems
- 70. What to read next
- IX. ‘How-to’ guides
-
- 71. Spring Boot application
- 72. Properties & configuration
-
- 72.1. Automatically expand properties at build time
- 72.2. Externalize the configuration of SpringApplication
- 72.3. Change the location of external properties of an application
- 72.4. Use ‘short’ command line arguments
- 72.5. Use YAML for external properties
- 72.6. Set the active Spring profiles
- 72.7. Change configuration depending on the environment
- 72.8. Discover built-in options for external properties
- 73. Embedded servlet containers
-
- 73.1. Add a Servlet, Filter or Listener to an application
- 73.2. Change the HTTP port
- 73.3. Use a random unassigned HTTP port
- 73.4. Discover the HTTP port at runtime
- 73.5. Configure SSL
- 73.6. Configure Access Logging
- 73.7. Use behind a front-end proxy server
- 73.8. Configure Tomcat
- 73.9. Enable Multiple Connectors with Tomcat
- 73.10. Use Tomcat’s LegacyCookieProcessor
- 73.11. Use Jetty instead of Tomcat
- 73.12. Configure Jetty
- 73.13. Use Undertow instead of Tomcat
- 73.14. Configure Undertow
- 73.15. Enable Multiple Listeners with Undertow
- 73.16. Use Tomcat 7.x or 8.0
- 73.17. Use Jetty 9.2
- 73.18. Use Jetty 8
- 73.19. Create WebSocket endpoints using @ServerEndpoint
- 73.20. Enable HTTP response compression
- 74. Spring MVC
-
- 74.1. Write a JSON REST service
- 74.2. Write an XML REST service
- 74.3. Customize the Jackson ObjectMapper
- 74.4. Customize the @ResponseBody rendering
- 74.5. Handling Multipart File Uploads
- 74.6. Switch off the Spring MVC DispatcherServlet
- 74.7. Switch off the Default MVC configuration
- 74.8. Customize ViewResolvers
- 74.9. Use Thymeleaf 3
- 75. HTTP clients
- 76. Logging
- 77. Data Access
-
- 77.1. Configure a custom DataSource
- 77.2. Configure Two DataSources
- 77.3. Use Spring Data repositories
- 77.4. Separate @Entity definitions from Spring configuration
- 77.5. Configure JPA properties
- 77.6. Configure Hibernate Naming Strategy
- 77.7. Use a custom EntityManagerFactory
- 77.8. Use Two EntityManagers
- 77.9. Use a traditional persistence.xml
- 77.10. Use Spring Data JPA and Mongo repositories
- 77.11. Expose Spring Data repositories as REST endpoint
- 77.12. Configure a component that is used by JPA
- 78. Database initialization
- 79. Messaging
- 80. Batch applications
- 81. Actuator
- 82. Security
- 83. Hot swapping
- 84. Build
-
- 84.1. Generate build information
- 84.2. Generate git information
- 84.3. Customize dependency versions
- 84.4. Create an executable JAR with Maven
- 84.5. Use a Spring Boot application as a dependency
- 84.6. Extract specific libraries when an executable jar runs
- 84.7. Create a non-executable JAR with exclusions
- 84.8. Remote debug a Spring Boot application started with Maven
- 84.9. Remote debug a Spring Boot application started with Gradle
- 84.10. Build an executable archive from Ant without using spring-boot-antlib
- 84.11. How to use Java 6
- 85. Traditional deployment
- X. Appendices
-
- A. Common application properties
- B. Configuration meta-data
- C. Auto-configuration classes
- D. Test auto-configuration annotations
- E. The executable jar format
- F. Dependency versions