Spring Boot Reference Documentation
Total Page:16
File Type:pdf, Size:1020Kb
Spring Boot Reference Documentation Phillip Webb, Dave Syer, Josh Long, Stéphane Nicoll, Rob Winch, Andy Wilkinson, Marcel Overdijk, Christian Dupuis, Sébastien Deleuze, Michael Simons, Vedran Pavić, Jay Bryant, Madhura Bhave, Eddú Meléndez, Scott Frederick 2.6.0-SNAPSHOT Table of Contents 1. Legal . 2 2. Getting Help . 3 3. Documentation Overview . 4 3.1. First Steps . 4 3.2. Upgrading From an Earlier Version . 4 3.3. Developing with Spring Boot . 4 3.4. Learning About Spring Boot Features . 4 3.5. Web . 5 3.6. Data . 5 3.7. Messaging . 5 3.8. IO . 5 3.9. Container Images . 6 3.10. Advanced Topics . 6 4. Getting Started . 7 4.1. Introducing Spring Boot . 7 4.2. System Requirements . 7 4.2.1. Servlet Containers. 7 4.3. Installing Spring Boot . 8 4.3.1. Installation Instructions for the Java Developer . 8 Maven Installation . 8 Gradle Installation . 9 4.3.2. Installing the Spring Boot CLI . 9 Manual Installation . 9 Installation with SDKMAN!. 9 OSX Homebrew Installation . 10 MacPorts Installation . 11 Command-line Completion. 11 Windows Scoop Installation. 11 Quick-start Spring CLI Example . 11 4.4. Developing Your First Spring Boot Application. 12 4.4.1. Creating the POM . 13 4.4.2. Adding Classpath Dependencies . 15 4.4.3. Writing the Code . 15 The @RestController and @RequestMapping Annotations . 16 The @EnableAutoConfiguration Annotation . 16 The “main” Method . 17 4.4.4. Running the Example. 17 4.4.5. Creating an Executable Jar . 17 4.5. What to Read Next . 19 5. Upgrading Spring Boot . 21 5.1. Upgrading from 1.x . 21 5.2. Upgrading to a new feature release . 21 5.3. Upgrading the Spring Boot CLI . 21 5.4. What to Read Next . 21 6. Developing with Spring Boot. 23 6.1. Build Systems. 23 6.1.1. Dependency Management . 23 6.1.2. Maven . 23 6.1.3. Gradle . 23 6.1.4. Ant . 24 6.1.5. Starters . 25 6.2. Structuring Your Code . 29 6.2.1. Using the “default” Package . ..