Book Image

Learning Spring Boot

By : Greg L. Turnquist
Book Image

Learning Spring Boot

By: Greg L. Turnquist

Overview of this book

<p>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.</p> <p>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.</p>
Table of Contents (13 chapters)
Learning Spring Boot
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Spring Security's default web-level protections


Remember how we earlier mentioned the extra security headers that Spring Security provides? Let's pause for a moment and check them out from the command line using curl:

$ curl -i localhost:8080/teammates
HTTP/1.1 302 Found
Server: Apache-Coyote/1.1
Location: https://localhost:8443/teammates
Content-Length: 0
Date: Wed, 27 Aug 2014 01:17:02 GMT

From this, we can see a 302 redirect to the secured SSL address, https://localhost:8443/teammates. Let's follow that and try again:

$ curl -i -k https://localhost:8443/teammates
HTTP/1.1 302 Found
Server: Apache-Coyote/1.1
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Set-Cookie: JSESSIONID=2DF972B5847F02C6A90778FE12A8619D; Path=/; Secure; HttpOnly
Location: https://localhost:8443/login
Content-Length: 0
Date...