0% found this document useful (0 votes)
178 views36 pages

Beginning Spring Boot 3: Build Dynamic Cloud-Native Java Applications and Microservices - Second Edition K. Siva Prasad Reddy 2024 Scribd Download

ebook

Uploaded by

kaklyjreije
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views36 pages

Beginning Spring Boot 3: Build Dynamic Cloud-Native Java Applications and Microservices - Second Edition K. Siva Prasad Reddy 2024 Scribd Download

ebook

Uploaded by

kaklyjreije
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Full download ebook at ebookmass.

com

Beginning Spring Boot 3: Build Dynamic Cloud-


Native Java Applications and Microservices -
Second Edition K. Siva Prasad Reddy

https://ebookmass.com/product/beginning-spring-
boot-3-build-dynamic-cloud-native-java-
applications-and-microservices-second-edition-k-
siva-prasad-reddy/

Download more ebook from https://ebookmass.com


More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Beginning Spring Boot 3 2nd Edition Siva Prasad Reddy


Katamreddy [K. Siva Prasad Reddy]

https://ebookmass.com/product/beginning-spring-boot-3-2nd-
edition-siva-prasad-reddy-katamreddy-k-siva-prasad-reddy/

Beginning Helidon: Building Cloud-Native Microservices


and Applications 1st Edition Dmitry Kornilov

https://ebookmass.com/product/beginning-helidon-building-cloud-
native-microservices-and-applications-1st-edition-dmitry-
kornilov-2/

Beginning Helidon: Building Cloud-Native Microservices


and Applications 1st Edition Dmitry Kornilov

https://ebookmass.com/product/beginning-helidon-building-cloud-
native-microservices-and-applications-1st-edition-dmitry-
kornilov/

Learn Microservices with Spring Boot 3: A Practical


Approach Using Event-Driven Architecture, Cloud-Native
Patterns, and Containerization 3rd Edition Moisés
Macero García
https://ebookmass.com/product/learn-microservices-with-spring-
boot-3-a-practical-approach-using-event-driven-architecture-
cloud-native-patterns-and-containerization-3rd-edition-moises-
Pro Spring Security: Securing Spring Framework 6 and
Boot 3–based Java Applications, Third Edition
Massimo Nardone

https://ebookmass.com/product/pro-spring-security-securing-
spring-framework-6-and-boot-3-based-java-applications-third-
edition-massimo-nardone/

Beginning Cloud Native Development with MicroProfile,


Jakarta EE, and Kubernetes: Java DevOps for Building
and Deploying Microservices-based Applications 1st
Edition Tarun Telang
https://ebookmass.com/product/beginning-cloud-native-development-
with-microprofile-jakarta-ee-and-kubernetes-java-devops-for-
building-and-deploying-microservices-based-applications-1st-
edition-tarun-telang/

Learn Microservices with Spring Boot 3 3rd / converted


Edition Moises Macero Garcia

https://ebookmass.com/product/learn-microservices-with-spring-
boot-3-3rd-converted-edition-moises-macero-garcia/

Beginning Spring Data: Data Access and Persistence for


Spring Framework 6 and Boot 3 Andres Sacco

https://ebookmass.com/product/beginning-spring-data-data-access-
and-persistence-for-spring-framework-6-and-boot-3-andres-sacco/

Building Modern Business Applications: Reactive Cloud


Architecture for Java, Spring, and PostgreSQL 1st
Edition Peter Royal

https://ebookmass.com/product/building-modern-business-
applications-reactive-cloud-architecture-for-java-spring-and-
postgresql-1st-edition-peter-royal-2/
Beginning
Spring Boot 3
Build Dynamic Cloud-Native Java
Applications and Microservices

Second Edition

K. Siva Prasad Reddy
Sai Upadhyayula
Beginning Spring Boot 3
Build Dynamic Cloud-Native Java
Applications and Microservices
Second Edition

K. Siva Prasad Reddy


Sai Upadhyayula
Beginning Spring Boot 3: Build Dynamic Cloud-Native Java Applications and
Microservices
K. Siva Prasad Reddy Sai Upadhyayula
Hyderabad, India Rotterdam, The Netherlands

ISBN-13 (pbk): 978-1-4842-8791-0 ISBN-13 (electronic): 978-1-4842-8792-7


https://doi.org/10.1007/978-1-4842-8792-7

Copyright © 2023 by K. Siva Prasad Reddy, Sai Upadhyayula


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Steve Anglin
Development Editor: Laura Berendson
Coordinating Editor: Gryffin Winkler
Copy Editor: Mary Behr
Cover designed by eStudio Calamar
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Apress Media, LLC, 1 New York Plaza, New York, NY 10004,
U.S.A. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.
springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science +
Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected]; for reprint,
paperback, or audio rights, please e-mail [email protected].
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub (github.com/apress). For more detailed information, please visit www.apress.com/
source-­code.
Printed on acid-free paper
Table of Contents
About the Authors�������������������������������������������������������������������������������������������������� xiii

About the Technical Reviewer���������������������������������������������������������������������������������xv


Acknowledgments�������������������������������������������������������������������������������������������������xvii

Introduction������������������������������������������������������������������������������������������������������������xix

Chapter 1: Introduction to Spring Boot��������������������������������������������������������������������� 1


Overview of the Spring Framework���������������������������������������������������������������������������������������������� 1
Spring Configuration Styles���������������������������������������������������������������������������������������������������������� 2
Developing a Web Application Using SpringMVC and JPA������������������������������������������������������������ 5
A Quick Taste of Spring Boot������������������������������������������������������������������������������������������������������� 21
Easy Dependency Management�������������������������������������������������������������������������������������������� 26
Autoconfiguration������������������������������������������������������������������������������������������������������������������ 27
Embedded Servlet Container Support����������������������������������������������������������������������������������� 27
Summary������������������������������������������������������������������������������������������������������������������������������������ 28

Chapter 2: Getting Started with Spring Boot���������������������������������������������������������� 29


What Is Spring Boot?������������������������������������������������������������������������������������������������������������������ 29
Spring Boot Starters�������������������������������������������������������������������������������������������������������������� 29
Spring Boot Autoconfiguration����������������������������������������������������������������������������������������������� 30
Elegant Configuration Management�������������������������������������������������������������������������������������� 31
Spring Boot Actuator������������������������������������������������������������������������������������������������������������� 31
Easy-to-Use Embedded Servlet Container Support��������������������������������������������������������������� 31
Your First Spring Boot Application���������������������������������������������������������������������������������������������� 31
Using Spring Initializr������������������������������������������������������������������������������������������������������������ 32
Using the Spring Tool Suite���������������������������������������������������������������������������������������������������� 32
Using IntelliJ IDEA����������������������������������������������������������������������������������������������������������������� 34

iii
Table of Contents

Using NetBeans IDE��������������������������������������������������������������������������������������������������������������� 35


Exploring the Project������������������������������������������������������������������������������������������������������������� 35
The Application Entry Point Class����������������������������������������������������������������������������������������������� 41
Fat JAR Using the Spring Boot Maven Plugin����������������������������������������������������������������������������� 43
Spring Boot Using Gradle������������������������������������������������������������������������������������������������������������ 44
Maven or Gradle?������������������������������������������������������������������������������������������������������������������ 45
Summary������������������������������������������������������������������������������������������������������������������������������������ 45

Chapter 3: Spring Boot Essentials�������������������������������������������������������������������������� 47


Logging��������������������������������������������������������������������������������������������������������������������������������������� 47
Externalizing Configuration Properties��������������������������������������������������������������������������������������� 49
Type-Safe Configuration Properties��������������������������������������������������������������������������������������� 50
Relaxed Binding��������������������������������������������������������������������������������������������������������������������� 51
Validating Properties with the Bean Validation API���������������������������������������������������������������� 52
Developer Tools��������������������������������������������������������������������������������������������������������������������������� 52
Summary������������������������������������������������������������������������������������������������������������������������������������ 55

Chapter 4: Web Applications with Spring Boot������������������������������������������������������� 57


Introducing Spring MVC�������������������������������������������������������������������������������������������������������������� 58
Developing Web Application Using Spring Boot�������������������������������������������������������������������������� 59
Creating the Domain Model of a Spring Blog Application������������������������������������������������������ 60
Creating a Controller Class���������������������������������������������������������������������������������������������������� 63
Creating Views����������������������������������������������������������������������������������������������������������������������� 64
Working with Thymeleaf Forms��������������������������������������������������������������������������������������������� 66
Implementing Form Validation����������������������������������������������������������������������������������������������� 74
Using the Tomcat, Jetty, and Undertow Embedded Servlet Containers�������������������������������������� 82
Customizing Embedded Servlet Containers�������������������������������������������������������������������������������� 85
Customizing SpringMVC Configuration��������������������������������������������������������������������������������������� 88
Spring Boot Web Application as a Deployable WAR�������������������������������������������������������������������� 89
File Uploading����������������������������������������������������������������������������������������������������������������������������� 91
Using ResourceBundles for Internationalization������������������������������������������������������������������������� 92

iv
Table of Contents

ResourceBundles for Hibernate Validation Errors����������������������������������������������������������������������� 95


Error Handling����������������������������������������������������������������������������������������������������������������������������� 97
Summary���������������������������������������������������������������������������������������������������������������������������������� 100

Chapter 5: Working with JDBC����������������������������������������������������������������������������� 101


Introduction to JdbcTemplate��������������������������������������������������������������������������������������������������� 101
Using JdbcTemplate Without Spring Boot��������������������������������������������������������������������������������� 103
Using JdbcTemplate with Spring Boot�������������������������������������������������������������������������������������� 111
Initializing the Database������������������������������������������������������������������������������������������������������ 111
Testing JDBC Code�������������������������������������������������������������������������������������������������������������� 112
Using Other Connection Pooling Libraries��������������������������������������������������������������������������� 114
Using Spring Data JDBC������������������������������������������������������������������������������������������������������������ 115
Database Migration with Flyway����������������������������������������������������������������������������������������������� 116
Summary���������������������������������������������������������������������������������������������������������������������������������� 118

Chapter 6: Working with MyBatis������������������������������������������������������������������������� 119


Using the Spring Boot MyBatis Starter������������������������������������������������������������������������������������� 119
Summary���������������������������������������������������������������������������������������������������������������������������������� 124

Chapter 7: Working with JOOQ����������������������������������������������������������������������������� 125


Introduction to JOOQ����������������������������������������������������������������������������������������������������������������� 125
Using Spring Boot’s JOOQ Starter��������������������������������������������������������������������������������������������� 126
Configuring Spring Boot JOOQ Starter��������������������������������������������������������������������������������� 126
Database Schema���������������������������������������������������������������������������������������������������������������� 127
Code Generation Using the JOOQ Maven Codegen Plugin��������������������������������������������������� 128
Using JOOQ DSL������������������������������������������������������������������������������������������������������������������ 133
Summary���������������������������������������������������������������������������������������������������������������������������������� 138

Chapter 8: Working with JPA�������������������������������������������������������������������������������� 139


Introducing the Spring Data JPA����������������������������������������������������������������������������������������������� 139
Using Spring Data JPA with Spring Boot����������������������������������������������������������������������������������� 142
Using the Sort and Pagination Features������������������������������������������������������������������������������ 146
Summary���������������������������������������������������������������������������������������������������������������������������������� 148

v
Table of Contents

Chapter 9: Working with MongoDB���������������������������������������������������������������������� 149


Introducing MongoDB��������������������������������������������������������������������������������������������������������������� 149
Installing MongoDB������������������������������������������������������������������������������������������������������������������� 150
Installing MongoDB on Windows����������������������������������������������������������������������������������������� 150
Installing MongoDB on macOS�������������������������������������������������������������������������������������������� 152
Installing MongoDB on Linux����������������������������������������������������������������������������������������������� 152
Getting Started with MongoDB Using the Mongo Shell������������������������������������������������������������� 152
Introducing Spring Data MongoDB�������������������������������������������������������������������������������������������� 153
Using Embedded Mongo for Testing����������������������������������������������������������������������������������������� 158
Summary���������������������������������������������������������������������������������������������������������������������������������� 160

Chapter 10: Building REST APIs Using Spring Boot���������������������������������������������� 161


Introduction to RESTful Web Services��������������������������������������������������������������������������������������� 161
REST API Using SpringMVC������������������������������������������������������������������������������������������������������� 163
Using Data Transfer Objects������������������������������������������������������������������������������������������������ 165
Continue Building the REST API������������������������������������������������������������������������������������������� 170
Defining an HTTP Response for the API������������������������������������������������������������������������������� 172
CORS (Cross-Origin Resource Sharing) Support������������������������������������������������������������������ 173
REST API Using Spring Data REST��������������������������������������������������������������������������������������������� 176
Sorting and Pagination�������������������������������������������������������������������������������������������������������� 179
CORS Support in Spring Data REST������������������������������������������������������������������������������������� 180
Exception Handling������������������������������������������������������������������������������������������������������������������� 181
Exercise������������������������������������������������������������������������������������������������������������������������������������ 184
Summary���������������������������������������������������������������������������������������������������������������������������������� 184

Chapter 11: Reactive Programming Using Spring WebFlux���������������������������������� 185


Introduction to Reactive Programming������������������������������������������������������������������������������������� 186
Reactive Streams���������������������������������������������������������������������������������������������������������������� 186
Project Reactor�������������������������������������������������������������������������������������������������������������������� 187
Reactive Web Applications Using Spring WebFlux�������������������������������������������������������������������� 189
WebFlux Using the Annotation-Based Programming Model������������������������������������������������ 190
WebFlux Using a Functional Programming Model��������������������������������������������������������������� 196

vi
Table of Contents

Working with Spring Data R2DBC���������������������������������������������������������������������������������������� 205


Reactive WebClient�������������������������������������������������������������������������������������������������������������� 209
Testing Spring WebFlux Applications����������������������������������������������������������������������������������� 210
Summary���������������������������������������������������������������������������������������������������������������������������������� 213

Chapter 12: Securing Web Applications��������������������������������������������������������������� 215


Spring Security in Spring Boot Web Application����������������������������������������������������������������������� 215
Implementing In-Memory Authentication���������������������������������������������������������������������������� 218
Implementing Custom User Authentication������������������������������������������������������������������������� 218
Custom Spring Security Configuration�������������������������������������������������������������������������������� 221
Implementing Logout Functionality������������������������������������������������������������������������������������� 224
Implementing User Registration������������������������������������������������������������������������������������������ 226
Hashing Passwords Using PasswordEncoder��������������������������������������������������������������������� 230
Implementing the Remember-Me Feature�������������������������������������������������������������������������� 231
Simple Hash-Based Token as a Cookie������������������������������������������������������������������������������� 232
Persistent Tokens���������������������������������������������������������������������������������������������������������������� 234
Cross-Site Request Forgery Protection������������������������������������������������������������������������������������� 236
Method-Level Security�������������������������������������������������������������������������������������������������������������� 237
Securing Spring Boot REST APIs using OAuth2������������������������������������������������������������������������� 240
What Is OAuth2.0?��������������������������������������������������������������������������������������������������������������� 240
OAuth Grant Types��������������������������������������������������������������������������������������������������������������� 242
Introduction to OIDC������������������������������������������������������������������������������������������������������������ 245
Introduction to Spring Authorization Server������������������������������������������������������������������������ 246
Setting Up Spring Authorization Server������������������������������������������������������������������������������� 246
Testing the Authorization Server Using Client Credentials�������������������������������������������������� 256
Configuring the Resource Server���������������������������������������������������������������������������������������� 260
Testing the Authorization Server Using the Authorization Code Flow���������������������������������� 262
Summary���������������������������������������������������������������������������������������������������������������������������������� 266

vii
Table of Contents

Chapter 13: Spring Boot Actuator������������������������������������������������������������������������� 267


Introducing the Spring Boot Actuator���������������������������������������������������������������������������������������� 267
Exploring Actuator’s Endpoints������������������������������������������������������������������������������������������������� 269
The /info Endpoint��������������������������������������������������������������������������������������������������������������� 270
The /health Endpoint����������������������������������������������������������������������������������������������������������� 271
The /beans Endpoint������������������������������������������������������������������������������������������������������������ 272
The /conditions Endpoint����������������������������������������������������������������������������������������������������� 273
The /mappings Endpoint������������������������������������������������������������������������������������������������������ 275
The /configprops Endpoint�������������������������������������������������������������������������������������������������� 276
The /metrics Endpoint��������������������������������������������������������������������������������������������������������� 277
The /env Endpoint���������������������������������������������������������������������������������������������������������������� 278
The /httptrace Endpoint������������������������������������������������������������������������������������������������������� 279
The /threaddump Endpoint�������������������������������������������������������������������������������������������������� 280
The /loggers Endpoint��������������������������������������������������������������������������������������������������������� 281
The /logfile Endpoint����������������������������������������������������������������������������������������������������������� 283
The /shutdown Endpoint������������������������������������������������������������������������������������������������������ 284
Customizing Actuator Endpoints����������������������������������������������������������������������������������������������� 285
Securing Actuator Endpoints����������������������������������������������������������������������������������������������������� 286
Implementing Custom Health Indicators����������������������������������������������������������������������������������� 286
Capturing Custom Application Metrics�������������������������������������������������������������������������������������� 289
CORS Support for Actuator Endpoints��������������������������������������������������������������������������������������� 292
Monitoring and Management Over JMX������������������������������������������������������������������������������������ 292
Summary���������������������������������������������������������������������������������������������������������������������������������� 293

Chapter 14: Testing Spring Boot Applications������������������������������������������������������ 295


Testing Spring Boot Applications���������������������������������������������������������������������������������������������� 296
Testing with Mock Implementations����������������������������������������������������������������������������������������� 301
Testing with Mockito����������������������������������������������������������������������������������������������������������� 303
Testing Slices of Application Using @*Test Annotations����������������������������������������������������������� 308
Testing SpringMVC Controllers Using @WebMvcTest���������������������������������������������������������� 308
Testing SpringMVC REST Controllers Using @WebMvcTest������������������������������������������������ 310

viii
Table of Contents

Testing Persistence Layer Components Using @DataJpaTest and @JdbcTest������������������� 312


Testing Persistence Layer Using TestContainers����������������������������������������������������������������� 317
Summary���������������������������������������������������������������������������������������������������������������������������������� 323

Chapter 15: GraphQL with Spring Boot����������������������������������������������������������������� 325


Introduction to GraphQL������������������������������������������������������������������������������������������������������������ 325
Working with GraphQL and Spring Boot������������������������������������������������������������������������������������ 328
Creating a GraphQL Controller��������������������������������������������������������������������������������������������� 330
Enabling GraphiQL UI Client������������������������������������������������������������������������������������������������� 332
Testing Support in Spring for GraphQL�������������������������������������������������������������������������������������� 333
Summary���������������������������������������������������������������������������������������������������������������������������������� 339

Chapter 16: Deploying Spring Boot Applications�������������������������������������������������� 341


Running Spring Boot Applications in Production Mode������������������������������������������������������������� 342
Deploying Spring Boot Application on Heroku�������������������������������������������������������������������������� 344
Running a Spring Boot Application on Docker�������������������������������������������������������������������������� 352
Installing Docker������������������������������������������������������������������������������������������������������������������ 353
Running a Spring Boot Application in a Docker Container��������������������������������������������������� 354
Creating Layered Docker Images���������������������������������������������������������������������������������������� 357
Using Cloud-Native Buildpacks������������������������������������������������������������������������������������������� 358
Running Multiple Containers Using docker-compose���������������������������������������������������������� 359
Summary���������������������������������������������������������������������������������������������������������������������������������� 360

Chapter 17: Spring Boot Autoconfiguration���������������������������������������������������������� 361


Exploring the Power of @Conditional���������������������������������������������������������������������������������������� 361
Using @Conditional Based on System Properties��������������������������������������������������������������� 362
Using @Conditional Based on the Presence or Absence of a Java Class���������������������������� 365
Using @Conditional Based on the Configured Spring Beans����������������������������������������������� 366
Using @Conditional Based on a Property’s Configuration��������������������������������������������������� 367
Spring Boot’s Built-In @Conditional Annotations���������������������������������������������������������������������� 369
How Spring Boot Autoconfiguration Works������������������������������������������������������������������������������� 372
Summary���������������������������������������������������������������������������������������������������������������������������������� 376

ix
Table of Contents

Chapter 18: Creating a Custom Spring Boot Starter��������������������������������������������� 377


Introducing Twitter4j����������������������������������������������������������������������������������������������������������������� 377
Custom Spring Boot Starter������������������������������������������������������������������������������������������������������ 378
Creating the twitter4j-spring-boot-autoconfigure Module�������������������������������������������������� 379
Twitter4j Properties to Hold the Twitter4j Config Parameters��������������������������������������������������� 381
Twitter4j Autoconfiguration to Autoconfigure Twitter4j������������������������������������������������������� 383
Creating the twitter4j-spring-boot-starter Module�������������������������������������������������������������� 385
Application Using twitter4j-spring-boot-starter������������������������������������������������������������������������ 387
Summary���������������������������������������������������������������������������������������������������������������������������������� 391

Chapter 19: Spring Boot with Kotlin, Scala, and Groovy��������������������������������������� 393
Using Spring Boot with Groovy������������������������������������������������������������������������������������������������� 393
Introducing Groovy�������������������������������������������������������������������������������������������������������������� 393
Creating a Spring Boot Application Using Groovy���������������������������������������������������������������� 397
Using Spring Boot with Scala���������������������������������������������������������������������������������������������������� 402
Introducing Scala���������������������������������������������������������������������������������������������������������������� 403
Creating a Spring Boot Application Using Scala������������������������������������������������������������������ 404
Using Spring Boot with Kotlin��������������������������������������������������������������������������������������������������� 410
Introducing Kotlin���������������������������������������������������������������������������������������������������������������� 410
Creating a Spring Boot Application Using Kotlin������������������������������������������������������������������ 411
Summary���������������������������������������������������������������������������������������������������������������������������������� 417

Chapter 20: Introducing JHipster������������������������������������������������������������������������� 419


Introducing JHipster������������������������������������������������������������������������������������������������������������������ 419
Installing JHipster��������������������������������������������������������������������������������������������������������������������� 420
Prerequisites����������������������������������������������������������������������������������������������������������������������� 420
Creating a JHipster Application������������������������������������������������������������������������������������������������� 420
Creating Entities������������������������������������������������������������������������������������������������������������������������ 424
Using the JHipster Entity Sub-Generator����������������������������������������������������������������������������� 425
Using JDL Studio����������������������������������������������������������������������������������������������������������������� 426
Managing Relationships������������������������������������������������������������������������������������������������������������ 426
Summary���������������������������������������������������������������������������������������������������������������������������������� 429

x
Table of Contents

Chapter 21: Spring Native������������������������������������������������������������������������������������ 431


Getting Started�������������������������������������������������������������������������������������������������������������������������� 432
Building a Native Image Using Buildpacks������������������������������������������������������������������������������� 432
Building Native Images Using GraalVM Native Build Tools�������������������������������������������������������� 435
Limitations of Spring Native������������������������������������������������������������������������������������������������������ 438
Summary���������������������������������������������������������������������������������������������������������������������������������� 438

Index��������������������������������������������������������������������������������������������������������������������� 439

xi
About the Authors
Siva Prasad Reddy Katamareddy is a software architect with 16 years of experience
in building scalable distributed enterprise applications. He has worked in banking
and e-commerce domains using Java, Kotlin, GoLang, Spring Boot, JPA/Hibernate,
microservices, REST APIs, SQL, and NoSQL databases. His current technical focus
is on modern architectures, including microservices, CI/CD, and DevOps, as well as
infrastructure automation using Jenkins, Terraform, AWS CDK, and Pulumi.

Sai Subramanyam Upadhyayula is a passionate software engineer who likes to share


his knowledge about Java and Spring Boot through his blog and YouTube Channel,
"Programming Techie." He has experience working with a variety of technologies
including Java, Kotlin, Typescript, Spring Boot, JPA/Hibernate, MongoDB, Angular,
and Golang. He also dabbles with DevOps-related activities by working with Jenkins
and AWS.

xiii
About the Technical Reviewer
Preethi Vasudev earned an MS in Computer Information Systems and Cyber Security
from Auburn University, Alabama. She is an Oracle-certified Java 8 programmer with
more than 15 years of industry experience in investment banking, healthcare, and other
areas. She is interested in Java and related technologies and enjoys participating in
coding competitions.

xv
Acknowledgments
I would like to thank my wife, Neha Jain, and my family members for their continuous
support all the days I spent writing this book.
I would like to express my gratitude to the Apress team, specifically to Steve Anglin
and Mark Powers, for their continuous support throughout the journey. I would also like
to thank the reviewers for providing valuable feedback that helped improve the quality of
the content.

Siva Prasad Reddy Katamareddy

I would like to thank and dedicate this to my lovely wife, Sowmya, for her continuous
support and my father, Phani Kumar, my mother, Malliswari, and my sister, Anusha.
I would like to also thank Mark Powers and Shonmirin for their continuous support
and patience throughout the journey. Special thanks also to the reviewers for the
valuable feedback.

Sai Subramanyam Upadhyayula

xvii
Another random document with
no related content on Scribd:
[83] Cambdenus, ut supra.
[84] Lhuydii Archæolog. Brit. pag. 219. col. 4.
[85] Histor. Rom. lib. LXII. pag. 702.
[86] Plin. N. H. lib. IV. cap. XVI.
[87] Perottus, Lilius Gyraldus, Cambdenus, &c.
[88] Lib. de Mundo c. III.
[89] Vide Notes on Cambden’s Brit. Edit. Gibs. p. 18. (X).
[90] Bocharti Canaan, lib. I. c. XXXIX.
[91] Strabo Geogr. lib. II. p. 191.
[92] N. H. lib. XXXIV. cap. XVI.
[93] Ut supra pag. 721.
[94] a Brith, Britannica voce, addita Græca terminatione tania pag. 28,
29, 30. Edit. Gibsoni.
[95] Glossarium Antiq. Britann. voce Alvion, p. 13.
[96] A littoribus ferventibus, & mari vel oceano circumfluo tam mire
semper æstuoso. Glossarium ad X. Scriptores voce Britannia.
[97] Consulas omnino Daviesium, Lhuydium & Boxhornium, qui Lexica
Britannicæ ling. scripserunt.
[98] History of the World, lib. I. cap. VIII. § 5. nec non & Robinson
Annal. Mundi, pag. 97.
[99] Hist. ut supra. l. c.
[100] De Situ Orbis, lib. III. cap. I.
[101] Ptolemæus Geogr. lib. II. c. II.
[102]
Transiit (D. Paulus) Oceanum & qua facit insula portum,
Quasque Britannus habet terras, quasque ultima Thule.
Venantius Fortunatus, &c.

[103] Hist. of Great Brit.


[104] In Glossar. ad X. Script. voce Brit.
[105] Unam tantum exhibere volo. Inter Cn. Pompejum & Cn. Vibium
humili loco natum, tantus error extitit de paribus lineamentis, ut Romani
Vibium Pompeji nomine, Pompejum Vibii vocabulo cognominarent.
Solinus cap I.
[106] Aristoteles, Diodorus, Strabo, Ptolemæus, Agathemerus, Polyænus,
Dio, Clemens Alex. Epitom. Strab. D. Joh. Chrysostomus tom. III. Joan.
Tzetza, &c.
[107] Cleomedes, Nummus Alabandensis, M. Heracleota, Chrysostomus
tom. IV & V. Polyænus, &c.
[108] M. Heracleota, p. 57, 58, 59, 60, Ptolemæus apud Steph. de
urbibus.
[109] M. Heracleota, p. 57, 58, 59.
[110] Apud Camb. Brit. p. 1.
[111] Dionysius Char. Polybius, Joh. Tzetza, &c.
[112] Aristoteles, M. Heracl. p. 9, 33.
[113] Ptolemæus, Agathemerus, &c.
[114] Johan. Tzetza.
[115] Lucius Ampelius.
[116] Lib. VIII. p. 526.
[117] Aped Gruter. p. CCCCLXXXII.
[118] Strabo, &c.
[119] Dionysius, &c.
[120] Monachi fere omnes.
[121] Juvenalis Lib. V. v. 705. Martialis lib. IX. epig. 22. Inscriptiones
variæ.
[122] Inscrip. variæ, Ausonius, &c. Romani suos provinciales constanter
Britannos, dicunt; quanquam ipsi provinciales sese Brittones appellari
gaudeant. Buchan. Rerum Scot. lib. I. c. I.
[123] Lib. IV. c. XVI.
[124] Pag. 673. tom. III. p. 676 tom. III. p. 696. tom. V. p. 635. tom. V.
p. 846. tom. VI. p. 111. tom. VIII. &c.
[125] Joh. Tzetzæ variæ Hist. Chil. 8. cap. CCXVII. v. 719, &c.
[126] Lib. de Mundo cap. III.
[127] Orbis descrip. v. 565.
[128] Lib. II. de Geogr. cap. IV. p. 39.
[129] De Mundo liber.
[130] Dionysius Characen. Orb. desc. v. 566, &c.
[131] Chil. 8. 678.
[132] Lib. I. de Geogr. c. II. p. 5. Vide & Non. Marcell. c. I. de prop.
sermon.
[133] Noct. Attic, lib. II. cap. XXII.
[134] Lib. de Mundo, cap. III.
[135] Johan. Tzetza, Chil. 8. 626.
[136] De situ Daniæ, cap. I.
[137] De situ Orbis, lib. II. c. VI.
[138] De Geogr. lib. IV. cap. 45. & V. cap. 4.
[139] De situ Brit. lib. I. cap. VIII. 10.
[140] Cæsar de Bello Gall. lib. II. cap. IV.
[141] Cæsar de B. G. lib. V. cap. XXIII.
[142] Notæ in Cæsar. p. 124.
[143] Descript. Orbis, v. 284, &c.
[144] Edit. Oxoniæ Hudson. 1717. 8. p. 50. No. I.
[145] Hist R. lib. XXXIX. pag. 114. consulas & Phil. Trans. N. 193.
[146] Hist. Nat. lib. III. cap I.
[147] e Thesauro Oyzeliano XXVII. Tab 12. exhibet Grævius in Florum p.
526. Edit. Amst. 1702. 8. Maj.
[148] Hist. Rom. lib. LXXVI. p. 867.
[149] Edit. Havniæ 1757, p. 67.
[150] Cosmog. p. 731. Edit. Gron.
[151] Hist. lib. I. cap. II.
[152] Rom. Hist. lib. LXXVI. p. 867.
[153] In Geticis suis.
[154] Vide infra, pag. 162.
[155] Hist. Eccl. lib. I. cap. I.
[156] Origin. lib. XIV. c. VI.
[157] Caput de Brit.
[158] Apud Salmasium. Plin. Exercit. cap. XXIII.
[159] XXX oportet legere.
[160] Editor Bedæ oper. Cantabr. 1722. Fol. Maj.
[161] Nat. Hist. lib. II. cap. CVIII.
[162] Censorinus de Die Nat. cap. XIII.
[163] In oratione Ægyptiaca.
[164] Ogyg. p. 11, 12, &c. Inis Mor. apud Cambd. Brit. p. 6. (h.)
[165] Philostr. Dion.
[166] Geogr. script. Græcorum min. 8. Oxoniæ 1703.
[167] Vide supra, pag. 157. N. 52.
[168] Mela de situ Orbis, lib. III. cap. VI.
[169] Comment. de B. G. lib. V. c. XIII.
[170] Biblioth. Hist. lib. V. c. XXI.
[171] Geogr. lib. IV. p. 199.
[172] De Bell. Gal. lib. V. cap. XIII.
[173] Philos. Trans. N. 330. pag. 266.
[174] Bibl. Hist. lib. V. cap. XXI.
[175] Geogr. lib. II. pag. 63, & 128.
[176] De Bell. Gall. lib. V. cap. XIII.
[177] Bibl. Hist. lib. V. c. XXI.
[178] Geogr. lib. IV. p. 199.
[179] Iliad Σ. 487.
[180] Ptolemæus, &c.
[181] Bibl. Hist. lib. V. c. XXI.
[182] De Bell. Gall. lib. V. cap. XIII.
[183] Bibl. Hist. lib. V. cap. XXI.
[184] Geogr. lib. IV. p. 199.
[185] Ibid. lib. II. p. 128.
[186] N. H. lib. IV. c. XVI.
[187] Lib. IV. p. 215.
[188] Cap. de Brit.
[189] Geogr. lib. II. p. 104.
[190] N. H. lib. IV. c. XVI.
[191] N. H. lib. III. c. I.
[192] Philos. Trans. N. 330. p. 266.
[193] P. 79. & 161.
[194] Vita Agricolæ, c. II.
[195] N. Salmon’s New Survey of England, vol. II. p. 841.
[196] Geogr. lib. II. p. 118, & 122.
[197] Descriptio Orbis, v. 7.
[198] Geogr. lib. II. p. 127, & 137.
[199] Polybius lib. II. p. 142. Plin. N. H. lib. III. c. V. Solinus c. VIII.
[200] Hist. Rom. lib. CV. apud Tacitum. Vita Agr. c. X.
[201] Apud Tacitum, l. c.
[202] Climat. VII. part. II. p. 272.
[203] Bibl. Hist. lib. V. c. XXI.
[204] Geogr. lib. IV. p. 199.
[205] De situ Orbis, lib. III. c. VI.
[206] Nostra autem ætas ex multis multorum itineribus certam
quodammodo totius insulæ jam deprehendit dimensionem, a Tarvisio
enim circumactis curvatisque littoribus per occasum ad Belerium plus
minus DCCCXII mill. pass. numerantur, inde conversa in austrum littoris
fronte ad Cantium CCCXX mill. pass. Hinc secundum Germanicum mare
angulosis recessibus per DCCIIII. mill. pass. ad Tarvisium protenditur, ut
hac ratione totius insulæ ambitus MDCCCXXXVI. mill. colligat. Brit. p. 2.
id est, 2140 milliaria Regia Statutaria.
[207] N. Hist. lib. IV. c. XVI.
[208] Supra, p. 90 & 100. Anonymus Ravenn. Geogr. lib. IV. cap. iv. & xi.
Frontem codicis, qui in Biblioth. D. Marci Venetiis extat, ornat effigies
Ptolemæi, vestitu regio induti, imposita capiti corona, error est, nonnullis
quoque viris recentioris ac medii ævi. Symoni Grynæo in Præfat. ad
Almagestum Basileæ 1538. &c. &, ut Vossius de Scient. Mathemat. p.
162. testatur, ante eum aliis.
[209] Lib. de rebus Geticis.
[210] De Bell. Gall. lib. V. c. XIII.
[211] Vide Horsley’s Britannia Romana, p. 361. nec non Philos. Transact.
No. 190, 241, 255.
[212] Vide Dr. Stukeley’s Carausius, p. 134 & 169, &c.
[213] Geogr. lib. II. c. III.
*** END OF THE PROJECT GUTENBERG EBOOK ITINERARIUM
CURIOSUM (CENTURIA II) ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the


United States and most other parts of the world at no
cost and with almost no restrictions whatsoever. You
may copy it, give it away or re-use it under the terms
of the Project Gutenberg License included with this
eBook or online at www.gutenberg.org. If you are not
located in the United States, you will have to check
the laws of the country where you are located before
using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU AGREE
THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT
EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE
THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person
or entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you
do or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status
by the Internal Revenue Service. The Foundation’s EIN or
federal tax identification number is 64-6221541. Contributions
to the Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact
Section 4. Information about Donations to
the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or determine
the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and
credit card donations. To donate, please visit:
www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.

You might also like