Learning Spring Boot

Learn how to use Spring Boot to build apps faster than ever before

Learning Spring Boot

This ebook is included in a Mapt subscription
Greg L. Turnquist

1 customer reviews
Learn how to use Spring Boot to build apps faster than ever before
$0.00
$13.50
$44.99
$29.99p/m after trial
RRP $26.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781784393021
Paperback252 pages

Book Description

This practical, accessible guide helps you get up and running fast with Spring Boot. This book starts by crafting a Spring MVC application using the Spring stack on top of Apache Tomcat, with little configuration on from your end. You will also learn how to write both JUnit and Spock test cases. Then, you'll pull back the curtain and see how Spring Boot works by using Spring Messaging (JMS and AMQP) as well as creating custom metrics, custom information, and custom CLI commands aimed at production environments. In the last two chapters, you'll see how Spring Boot supports everyday situations we all deal with. You will learn how to create multiple configurations inside your app that can interact with different data stores.

By the end of the book, you'll have a good understanding of how Spring Boot works, how it manages low-level infrastructure, and how to start out production-grade apps with built-in support tools as well as custom ones.

Table of Contents

Chapter 1: Quick Start with Groovy
Getting started
Installing Spring Boot's CLI
Testing with Spring Boot's CLI
Bundling and deploying a Spring Boot application
Adding support for templates
Modernizing our app with JavaScript
Adding production-ready support features
Summary
Chapter 2: Quick Start with Java
Creating an empty project with start.spring.io
Running a Spring Boot application
Adding Spring Social GitHub
Digging into GitHub issues
Delving into Spring Boot's property support
Adding server-side mobile support with Spring Mobile
Creating a mobile frontend with jQuery Mobile
Bundling up the application as a runnable JAR
Deploying to Cloud Foundry
Adding production-ready support
Summary
Chapter 3: Debugging and Managing Your App
Creating a JMS-based publisher/subscriber app
Using Spring Boot's auto-configuration report
Overriding Boot with alternate beans or properties
Writing a custom health check to ping ActiveMQ
Adding customized app data to /info
Creating custom metrics to track the message traffic
Tweaking management ports, address, and paths
Restricting access only to JMX
Connecting to the app via JConsole and jmxterm
Creating custom CRaSH commands
Summary
Chapter 4: Data Access with Spring Boot
Creating an app using H2's in-memory database
Defining entities and repositories
Loading data using a SQL script
Loading data programmatically
Adding a production profile for a MySQL database
Adding Spring Data REST and using it to manage teammates
Reconfiguring our app to use Spring Data MongoDB
Running our MongoDB-based app
Summary
Chapter 5: Securing Your App with Spring Boot
Getting started
Defining our domain
Loading the test data
Creating a server-side controller
Crafting our HTML templates
Running our unsecured application
Securing our app
Navigating with basic authentication
Enhancing the security model of our app
Configuring user data to persist
Configuring embedded Tomcat to use SSL
Spring Security's default web-level protections
Navigating our fully secured app
Summary

What You Will Learn

  • Use Spring Boot's CLI tool to build rapid Groovy-based apps without even touching a build tool
  • Craft a Spring JMS app with ActiveMQ
  • Work with multiple database configurations using Spring Data JPA in development and production as well as Spring Data MongoDB
  • Find out exactly what beans Spring Boot is creating for you, and why it decided to do so
  • Secure your app at the URL and method levels
  • Use Spring Data REST to export your Spring Data repositories to support independent clients
  • Configure the embedded Tomcat servlet engine to use SSL and see how it automatically uses HSTS

Authors

Table of Contents

Chapter 1: Quick Start with Groovy
Getting started
Installing Spring Boot's CLI
Testing with Spring Boot's CLI
Bundling and deploying a Spring Boot application
Adding support for templates
Modernizing our app with JavaScript
Adding production-ready support features
Summary
Chapter 2: Quick Start with Java
Creating an empty project with start.spring.io
Running a Spring Boot application
Adding Spring Social GitHub
Digging into GitHub issues
Delving into Spring Boot's property support
Adding server-side mobile support with Spring Mobile
Creating a mobile frontend with jQuery Mobile
Bundling up the application as a runnable JAR
Deploying to Cloud Foundry
Adding production-ready support
Summary
Chapter 3: Debugging and Managing Your App
Creating a JMS-based publisher/subscriber app
Using Spring Boot's auto-configuration report
Overriding Boot with alternate beans or properties
Writing a custom health check to ping ActiveMQ
Adding customized app data to /info
Creating custom metrics to track the message traffic
Tweaking management ports, address, and paths
Restricting access only to JMX
Connecting to the app via JConsole and jmxterm
Creating custom CRaSH commands
Summary
Chapter 4: Data Access with Spring Boot
Creating an app using H2's in-memory database
Defining entities and repositories
Loading data using a SQL script
Loading data programmatically
Adding a production profile for a MySQL database
Adding Spring Data REST and using it to manage teammates
Reconfiguring our app to use Spring Data MongoDB
Running our MongoDB-based app
Summary
Chapter 5: Securing Your App with Spring Boot
Getting started
Defining our domain
Loading the test data
Creating a server-side controller
Crafting our HTML templates
Running our unsecured application
Securing our app
Navigating with basic authentication
Enhancing the security model of our app
Configuring user data to persist
Configuring embedded Tomcat to use SSL
Spring Security's default web-level protections
Navigating our fully secured app
Summary

Book Details

ISBN 139781784393021
Paperback252 pages
Read More
From 1 reviews

Read More Reviews