100% found this document useful (15 votes)
129 views65 pages

Spring Quick Reference Guide: A Pocket Handbook for Spring Framework, Spring Boot, and More Adam L. Davis All Chapters Instant Download

Pocket

Uploaded by

orimihirwan
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
100% found this document useful (15 votes)
129 views65 pages

Spring Quick Reference Guide: A Pocket Handbook for Spring Framework, Spring Boot, and More Adam L. Davis All Chapters Instant Download

Pocket

Uploaded by

orimihirwan
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/ 65

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Spring Quick Reference Guide: A Pocket Handbook


for Spring Framework, Spring Boot, and More Adam
L. Davis

https://textbookfull.com/product/spring-quick-reference-
guide-a-pocket-handbook-for-spring-framework-spring-boot-
and-more-adam-l-davis/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Pro Spring MVC with WebFlux: Web Development in Spring


Framework 5 and Spring Boot 2 2nd Edition Marten Deinum

https://textbookfull.com/product/pro-spring-mvc-with-webflux-web-
development-in-spring-framework-5-and-spring-boot-2-2nd-edition-
marten-deinum/
textboxfull.com

Pro Spring MVC with WebFlux: Web Development in Spring


Framework 5 and Spring Boot 2 2nd Edition Marten Deinum

https://textbookfull.com/product/pro-spring-mvc-with-webflux-web-
development-in-spring-framework-5-and-spring-boot-2-2nd-edition-
marten-deinum-2/
textboxfull.com

Pro Spring MVC with WebFlux Web Development in Spring


Framework 5 and Spring Boot 2 Second Edition Marten Deinum
Iuliana Cosmina
https://textbookfull.com/product/pro-spring-mvc-with-webflux-web-
development-in-spring-framework-5-and-spring-boot-2-second-edition-
marten-deinum-iuliana-cosmina/
textboxfull.com

Pro Spring Security: Securing Spring Framework 5 and Boot


2-based Java Applications 2nd Edition Carlo Scarioni

https://textbookfull.com/product/pro-spring-security-securing-spring-
framework-5-and-boot-2-based-java-applications-2nd-edition-carlo-
scarioni/
textboxfull.com
Pro Spring 5: an in-depth guide to the Spring framework
and its tools Cosmina

https://textbookfull.com/product/pro-spring-5-an-in-depth-guide-to-
the-spring-framework-and-its-tools-cosmina/

textboxfull.com

Spring Boot Persistence Best Practices: Optimize Java


Persistence Performance in Spring Boot Applications 1st
Edition Anghel Leonard
https://textbookfull.com/product/spring-boot-persistence-best-
practices-optimize-java-persistence-performance-in-spring-boot-
applications-1st-edition-anghel-leonard/
textboxfull.com

Biota Grow 2C gather 2C cook Loucas

https://textbookfull.com/product/biota-grow-2c-gather-2c-cook-loucas/

textboxfull.com

Practical Microservices Architectural Patterns: Event-


Based Java Microservices with Spring Boot and Spring Cloud
Christudas
https://textbookfull.com/product/practical-microservices-
architectural-patterns-event-based-java-microservices-with-spring-
boot-and-spring-cloud-christudas/
textboxfull.com

Spring Boot 2 0 Projects Build production grade reactive


applications and microservices with Spring Boot English
Edition Mohamed Shazin Sadakath
https://textbookfull.com/product/spring-boot-2-0-projects-build-
production-grade-reactive-applications-and-microservices-with-spring-
boot-english-edition-mohamed-shazin-sadakath/
textboxfull.com
Spring Quick
Reference
Guide
A Pocket Handbook for Spring
Framework, Spring Boot, and More

Adam L. Davis
Spring Quick
Reference Guide
A Pocket Handbook for
Spring Framework,
Spring Boot, and More

Adam L. Davis
Spring Quick Reference Guide: A Pocket Handbook for Spring
Framework, Spring Boot, and More
Adam L. Davis
Oviedo, FL, USA

ISBN-13 (pbk): 978-1-4842-6143-9 ISBN-13 (electronic): 978-1-4842-6144-6


https://doi.org/10.1007/978-1-4842-6144-6

Copyright © 2020 by Adam L. Davis


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 author 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: Matthew Moodie
Coordinating Editor: Mark Powers
Cover designed by eStudioCalamar
Cover image by Sergey Shmidt on Unsplash (www.unsplash.com)
Distributed to the book trade worldwide by Springer Science+Business Media, 1 New York Plaza,
New York, NY 10004, U.S.A. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@
springer-­sbm.com, 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 http://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 via the book’s product page, located at www.apress.com/
9781484261439. For more detailed information, please visit http://www.apress.com/
source-code.
Printed on acid-free paper
Dedicated to my sons
I hope your love of knowledge continues to flourish
Table of Contents
About the Author�������������������������������������������������������������������������������xiii

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

Chapter 1: Introduction������������������������������������������������������������������������1
Who Should Read This Book���������������������������������������������������������������������������������2
About This Book����������������������������������������������������������������������������������������������������2

Chapter 2: Overview�����������������������������������������������������������������������������5
Core Spring�����������������������������������������������������������������������������������������������������������5
Spring Modules�����������������������������������������������������������������������������������������������������7

Chapter 3: Dependency Injection����������������������������������������������������������9


Decoupling������������������������������������������������������������������������������������������������������������9
Configuration������������������������������������������������������������������������������������������������������10
Application Context���������������������������������������������������������������������������������������12
Component Scanning������������������������������������������������������������������������������������12
Import������������������������������������������������������������������������������������������������������������13
Laziness���������������������������������������������������������������������������������������������������������14
Shut Down the ApplicationContext����������������������������������������������������������������14
BeanFactoryPostProcessors�������������������������������������������������������������������������������14
BeanPostProcessors�������������������������������������������������������������������������������������������15
Init and Destroy Methods������������������������������������������������������������������������������������16

v
Table of Contents

Properties������������������������������������������������������������������������������������������������������������16
Environment��������������������������������������������������������������������������������������������������������17
Profiles����������������������������������������������������������������������������������������������������������������18
SpEL��������������������������������������������������������������������������������������������������������������������19
Testing����������������������������������������������������������������������������������������������������������������20

Chapter 4: XML Configuration�������������������������������������������������������������23


XML���������������������������������������������������������������������������������������������������������������������23
Spring XML Configuration Organization���������������������������������������������������������24
XML Application Context��������������������������������������������������������������������������������24
XML Beans����������������������������������������������������������������������������������������������������������26
Init and Destroy���������������������������������������������������������������������������������������������27
Enabling AOP�������������������������������������������������������������������������������������������������������28
AOP Configuration�����������������������������������������������������������������������������������������28
Enabling Spring Data JPA�����������������������������������������������������������������������������������29
Mixing XML and Java Configuration��������������������������������������������������������������������30

Chapter 5: Spring AOP������������������������������������������������������������������������33


Terminology��������������������������������������������������������������������������������������������������������34
Advice�����������������������������������������������������������������������������������������������������������������34
How to Enable AOP����������������������������������������������������������������������������������������������35
How to Define a Pointcut������������������������������������������������������������������������������������36
Annotations���������������������������������������������������������������������������������������������������������38
Pointcut Expressions�������������������������������������������������������������������������������������������38
Bindings in Spring AOP���������������������������������������������������������������������������������������40
Limitations of Spring AOP�����������������������������������������������������������������������������������40
Alternatives���������������������������������������������������������������������������������������������������������41

vi
Table of Contents

Chapter 6: Spring Data�����������������������������������������������������������������������43


Domain Entities���������������������������������������������������������������������������������������������������43
Spring Data JDBC������������������������������������������������������������������������������������������������46
Getting Started����������������������������������������������������������������������������������������������46
Defining a Repository������������������������������������������������������������������������������������������47
Custom Queries���������������������������������������������������������������������������������������������������48
Custom Queries in JPA����������������������������������������������������������������������������������49
JdbcTemplate������������������������������������������������������������������������������������������������������51
Spring Data JPA��������������������������������������������������������������������������������������������������51
Paging and Sorting����������������������������������������������������������������������������������������52
Transactions��������������������������������������������������������������������������������������������������������53
Spring Data R2DBC���������������������������������������������������������������������������������������������56
Custom Reactive Queries������������������������������������������������������������������������������59
Kotlin Support������������������������������������������������������������������������������������������������59

Chapter 7: Spring MVC�����������������������������������������������������������������������61


Core Concepts�����������������������������������������������������������������������������������������������������61
Getting Started����������������������������������������������������������������������������������������������������62
Controllers�����������������������������������������������������������������������������������������������������������63
Request Mappings����������������������������������������������������������������������������������������������63
Path Regular Expressions������������������������������������������������������������������������������65
Mapping Method Parameters������������������������������������������������������������������������66
Response Body���������������������������������������������������������������������������������������������������67
Views������������������������������������������������������������������������������������������������������������������68
View Resolvers����������������������������������������������������������������������������������������������69
Error Handling�����������������������������������������������������������������������������������������������������72
Web Scopes��������������������������������������������������������������������������������������������������������73
Testing����������������������������������������������������������������������������������������������������������������73

vii
Table of Contents

Chapter 8: Spring Mobile��������������������������������������������������������������������79


Getting Started����������������������������������������������������������������������������������������������������79
DeviceResolverHandlerInterceptor����������������������������������������������������������������80
DeviceResolverRequestFilter�������������������������������������������������������������������������81
Accessing the Device������������������������������������������������������������������������������������������82
DeviceWebArgumentResolver�����������������������������������������������������������������������83
LiteDeviceResolver����������������������������������������������������������������������������������������������83
Site Preference Management�����������������������������������������������������������������������������84
Spring Mobile Example���������������������������������������������������������������������������������������86

Chapter 9: Spring Security�����������������������������������������������������������������95


Features��������������������������������������������������������������������������������������������������������������95
Overview�������������������������������������������������������������������������������������������������������������96
Configuration������������������������������������������������������������������������������������������������������96
Password Security�����������������������������������������������������������������������������������������99
Accessing the Authentication����������������������������������������������������������������������100
Annotation Security�������������������������������������������������������������������������������������������101
Using @Secured������������������������������������������������������������������������������������������102
Using PreAuthorize��������������������������������������������������������������������������������������103
Global Method Security�������������������������������������������������������������������������������104
SpEL������������������������������������������������������������������������������������������������������������104

Chapter 10: Spring Web Services�����������������������������������������������������107


Features������������������������������������������������������������������������������������������������������������107
Getting Started��������������������������������������������������������������������������������������������������108
Spring Boot Config���������������������������������������������������������������������������������������110
Contract First����������������������������������������������������������������������������������������������������110
Writing the Endpoint������������������������������������������������������������������������������������112
Generating the WSDL�����������������������������������������������������������������������������������114

viii
Table of Contents

EndpointMappings and EndpointExceptionResolvers���������������������������������������115


Customizing�������������������������������������������������������������������������������������������������116
EndpointInterceptor������������������������������������������������������������������������������������������117

Chapter 11: Spring REST�������������������������������������������������������������������119


Spring REST Docs���������������������������������������������������������������������������������������������120
Getting Started��������������������������������������������������������������������������������������������120
REST Docs Generation���������������������������������������������������������������������������������123
Serving the Documentation in Spring Boot�������������������������������������������������125
Spring HATEOAS������������������������������������������������������������������������������������������������125
Getting Started��������������������������������������������������������������������������������������������126
Creating Links����������������������������������������������������������������������������������������������126
Testing���������������������������������������������������������������������������������������������������������128

Chapter 12: Reactor��������������������������������������������������������������������������133


Why Use Reactor?���������������������������������������������������������������������������������������������133
Getting Started��������������������������������������������������������������������������������������������������134
Flux�������������������������������������������������������������������������������������������������������������������135
Mono�����������������������������������������������������������������������������������������������������������������136
Creating a Flux or Mono������������������������������������������������������������������������������136
Schedulers��������������������������������������������������������������������������������������������������������139
Pull Events��������������������������������������������������������������������������������������������������������141
Handling Backpressure�������������������������������������������������������������������������������������142
Context��������������������������������������������������������������������������������������������������������������144
Testing��������������������������������������������������������������������������������������������������������������145
StepVerifier��������������������������������������������������������������������������������������������������146
TestPublisher�����������������������������������������������������������������������������������������������148
Tuples and Zip���������������������������������������������������������������������������������������������������149
Reactor Addons�������������������������������������������������������������������������������������������������151

ix
Table of Contents

Chapter 13: Spring Integration���������������������������������������������������������153


Features������������������������������������������������������������������������������������������������������������153
Getting Started��������������������������������������������������������������������������������������������������154
Adding Additional Support���������������������������������������������������������������������������156
Message Gateway���������������������������������������������������������������������������������������������157
IntegrationFlow�������������������������������������������������������������������������������������������������158
Kafka Config������������������������������������������������������������������������������������������������������163
Topics����������������������������������������������������������������������������������������������������������164
Monitoring���������������������������������������������������������������������������������������������������������165

Chapter 14: Spring Batch�����������������������������������������������������������������167


Features������������������������������������������������������������������������������������������������������������167
Overview�����������������������������������������������������������������������������������������������������������167
The Example�����������������������������������������������������������������������������������������������������168
Build������������������������������������������������������������������������������������������������������������168
Schema�������������������������������������������������������������������������������������������������������172
Course���������������������������������������������������������������������������������������������������������173
CourseProcessor�����������������������������������������������������������������������������������������174
BatchConfiguration��������������������������������������������������������������������������������������175
JobExecutionListener����������������������������������������������������������������������������������179
Spring Batch Metadata�������������������������������������������������������������������������������������180
Spring Retry������������������������������������������������������������������������������������������������������181
Retry Terms�������������������������������������������������������������������������������������������������183
Retryable Annotation�����������������������������������������������������������������������������������183

Chapter 15: Spring Boot�������������������������������������������������������������������185


Introduction to Spring Boot�������������������������������������������������������������������������������185
Creating a New Project�������������������������������������������������������������������������������������186
Spring Boot CLI��������������������������������������������������������������������������������������������187

x
Table of Contents

SpringBootApplication��������������������������������������������������������������������������������������188
Auto-configuration��������������������������������������������������������������������������������������������189
Enabling Auto-config�����������������������������������������������������������������������������������190
Excluding Auto-config���������������������������������������������������������������������������������192
Application Properties���������������������������������������������������������������������������������������193
Overriding Properties�����������������������������������������������������������������������������������193
Auto Spring AOP������������������������������������������������������������������������������������������194
Spring Boot Actuator�����������������������������������������������������������������������������������������194
Spring Boot Testing�������������������������������������������������������������������������������������������194

Chapter 16: Spring Boot Actuator�����������������������������������������������������199


Default Endpoints����������������������������������������������������������������������������������������������199
Configuring Actuator�����������������������������������������������������������������������������������������201
Exposing Endpoints�������������������������������������������������������������������������������������201
Info��������������������������������������������������������������������������������������������������������������������202
Health����������������������������������������������������������������������������������������������������������������203
Auto-configured HealthIndicators����������������������������������������������������������������203
Custom Health���������������������������������������������������������������������������������������������204
Metrics��������������������������������������������������������������������������������������������������������������206
Audit������������������������������������������������������������������������������������������������������������������208
Logging�������������������������������������������������������������������������������������������������������������208

Chapter 17: Spring WebFlux�������������������������������������������������������������211


Getting Started��������������������������������������������������������������������������������������������������212
Gradle Plugin�����������������������������������������������������������������������������������������������������212
Tasks�����������������������������������������������������������������������������������������������������������������214
SpringBootApplication��������������������������������������������������������������������������������������214
Our Domain Model��������������������������������������������������������������������������������������������215

xi
Table of Contents

ReactiveMongoRepository��������������������������������������������������������������������������������217
Controllers���������������������������������������������������������������������������������������������������������218
View Templates�������������������������������������������������������������������������������������������������219
RESTful API�������������������������������������������������������������������������������������������������������221
Further Configuration����������������������������������������������������������������������������������224
Testing��������������������������������������������������������������������������������������������������������������227
Spring Data R2DBC�������������������������������������������������������������������������������������������228
Netty or Tomcat�������������������������������������������������������������������������������������������������228
WebClient����������������������������������������������������������������������������������������������������������228

Chapter 18: Spring Cloud������������������������������������������������������������������231


Features������������������������������������������������������������������������������������������������������������231
Getting Started��������������������������������������������������������������������������������������������������232
Spring Cloud Netflix������������������������������������������������������������������������������������������235
Finding a Service�����������������������������������������������������������������������������������������237
Spring Cloud Config������������������������������������������������������������������������������������������239
Spring Cloud OpenFeign�����������������������������������������������������������������������������������240
Spring Cloud for AWS����������������������������������������������������������������������������������������241
Spring Cloud Stream�����������������������������������������������������������������������������������������242

Index�������������������������������������������������������������������������������������������������247

xii
About the Author
Adam L. Davis makes software. He’s spent
many years developing in Java (since Java
1.2), has enjoyed using Spring for more than a
decade, and is a Certified Spring Professional.
He has experience using Java, Groovy,
JavaScript, AWS, Hibernate, and much more
to build applications and has worked at both
large and small corporations.
Adam holds a master’s degree in Computer
Science from Georgia Tech. He is also the
author of Reactive Streams in Java (Apress, 2019) and Learning Groovy 3
(Apress, 2019). You can check out his website at http://adamldavis.com/.

xiii
About the Technical Reviewer
Manuel Jordan Elera is an autodidactic
developer and researcher who enjoys learning
new technologies for his own experiments and
creating new integrations. Manuel won the
Springy Award – Community Champion and
Spring Champion 2013. In his little free time,
he reads the Bible and composes music on his
guitar. Manuel is known as dr_pompeii.
He has tech-reviewed numerous books
for Apress, including Pro Spring Boot 2
(2019), Rapid Java Persistence and Microservices (2019), Java Language
Features (2018), Spring Boot 2 Recipes (2018), and Java APIs, Extensions
and Libraries (2018). Read his 13 detailed tutorials about many Spring
technologies, contact him through his blog at www.manueljordanelera.
blogspot.com, and follow him on his Twitter account, @dr_pompeii.

xv
CHAPTER 1

Introduction
Spring has skyrocketed from a small open source project when it
launched (version 1.0) in 2004 to an almost universal requirement of
Java- and JVM-­based projects today. What started as a more lightweight
replacement for JEE has morphed into much more while still keeping to
the fundamental principles.
Although some Spring subprojects, like Spring Roo, did not become
extremely popular, many others have found an audience and flourished.
There are a large number of projects under the “Spring” name, helping
developers with everything from cloud applications to relational database
queries and much more.

Note Every effort has been made to ensure that the information
in this book is accurate, but due to the complexity of Spring and the
many versions of Spring in the past and future, there may be some
inaccuracies, such as new features that are not present at the time of
writing, depending on which version you are using.

© Adam L. Davis 2020 1


A. L. Davis, Spring Quick Reference Guide, https://doi.org/10.1007/978-1-4842-6144-6_1
Chapter 1 Introduction

Who Should Read This Book


This book is for every Java developer that wants to know more about the
Spring framework, Spring Boot, and related technologies. This book covers
everything from the basics to some advanced topics. Not many words will
be spent on the history; instead, it will focus on helpful information for
developing applications right now.
Whether you’re a beginner or a seasoned Java expert, this book should
be useful.

About This Book


This book is organized so it might be read in order, for those who are new
to Spring, or as a reference to come back to for many years into the future.
Each chapter will cover a Spring project or core Spring framework and is
divided into many titled sections. It will refer to all three ways to configure
Spring Beans, XML, Java configuration classes, and component scanning,
but with the main focus on the latter two.
This book will focus on core concepts and provide code samples.
Examples will be practical and come from real-world experience.

2
Chapter 1 Introduction

Especially important information will be outlined as follows:

Tips Text styled like this provides additional information that


you may find very helpful.
Info Text styled this way usually refers the curious reader to
additional information located outside of this book.
Warnings Text such as this cautions the wary reader to
common problems that they might encounter.
Exercises This is an exercise. We learn best by doing, so it’s
important that you try these out.

3
CHAPTER 2

Overview
Spring was initially started as an alternative to more heavy approaches
to enterprise applications such as the J2EE standard. It made it possible
to cleanly separate the framework from the code by allowing the
configuration of POJOs (Plain Old Java Objects) rather than forcing classes
to extend a certain class or implement an interface.
Spring grew and evolved over time and is the most popular Java
framework for building applications today.

C
 ore Spring
Core Spring includes Spring’s Dependency Injection (DI) framework and
configuration. The DI design pattern is a way to externalize the details
of a dependency by allowing them to be injected. This, coupled with the
use of interfaces, allows you to decouple code and makes software more
manageable and extensible. DI is a subset of Inversion of Control (IoC),
where the flow of an application is reversed or inverted.
Core Spring provides Spring containers, primarily implementations of
the BeanFactory interface and its subinterface ApplicationContext. There
are many implementations of ApplicationContext, and which one you
use depends on the type of application. Most of the time, your application
code need not be aware of the concrete type of the BeanFactory or
ApplicationContext; it should only be defined once per application.

© Adam L. Davis 2020 5


A. L. Davis, Spring Quick Reference Guide, https://doi.org/10.1007/978-1-4842-6144-6_2
Chapter 2 Overview

An ApplicationContext provides Bean factory methods for accessing


application components (inherited from the ListableBeanFactory
interface), the ability to load file resources in a generic fashion, the
ability to publish events to registered listeners (inherited from the
ApplicationEventPublisher interface), the ability to resolve messages
supporting internationalization (inherited from the MessageSource
interface), and possible inheritance from a parent ApplicationContext.
ApplicationContext has many different subclasses, one of which is
WebApplicationContext, which, as the same suggests, is useful for web
applications.

Figure 2-1. Simplified class diagram for WebApplicationContext

Beans from POJOs can be configured in one of three ways: XML,


methods annotated with @Bean in a configuration Java class annotated
with @Configuration, or when using component scanning, you can
add an annotation such as @Component or @Service on the POJO
class itself. The most recommended way is using one or more Java
configuration classes for infrastructure and component scanning for
business classes.

6
Chapter 2 Overview

Spring Modules
Spring has many modules which can be included or not depending on the
needs of the application. Here are some of the modules and projects under
the Spring umbrella:
• Aspect-oriented programming (AOP) – Enables
implementing cross-cutting concerns through runtime
code interweaving.

• Spring Security – Authentication and authorization,


configurable security that supports a range of
standards, protocols, tools, and practices.

• Spring Data – Templates and tools for working with


relational database management systems on the Java
platform using Java Database Connectivity (JDBC),
Object-Relational Mapping (ORM) tools, Reactive
Relational Database Connectivity (R2DBC), and NoSQL
databases.

• Core – Inversion of Control container, configuration of


application components, and life-cycle management
of Beans.

• Messaging – Registration of message listener objects


for transparent message-consumption and sending
to/from message queues via multiple transport layers
including Java Message Service (JMS), AMQP, Kafka,
and many others.

• Spring MVC (Model-View-Controller) – An HTTP and


servlet-based framework providing hooks for extension
and customization for web applications and RESTful
(Representational State Transfer) web services.

7
Chapter 2 Overview

• Transaction management – Unifies several transaction


management APIs and coordinates transactions
supporting JTA and JXA.

• Testing – Supports classes for writing both unit and


integration tests such as Spring MVC Test which supports
testing the controllers of Spring MVC applications.

• Spring Boot – Convention over configuration framework


for simplifying application development. It includes
auto-configuration and has “starter” dependencies
that include many open source dependencies and the
compatible versions of each dependency.

• Spring WebFlux – A reactive web framework using the


reactive stream specification that can run on Netty,
Tomcat, or Jetty (using Servlet 3.0 asynchronous
threading).

Figure 2-2. Spring modules

8
CHAPTER 3

Dependency Injection
Dependency Injection (DI) is at the heart of Spring. It refers to plugging
in references at runtime between many different objects, either through a
constructor, setter, or even directly to a field using runtime reflection. This
enables IOC (Inversion of Control) where one class can use an instance
of another class without knowing any details about how that object was
constructed or its exact implementation class.
Spring’s design allows the use of POJOs (Plain Old Java Objects). In
other words, you don’t need to implement a specific interface or extend
a class in order to use Spring’s DI. An instance of a class configured by
Spring is called a Spring Bean, or sometimes just bean for short.

D
 ecoupling
For example, you can annotate a setter or field with @Autowired on a
Spring Bean, and Spring will find the class at runtime that best matches
that field or setter. By default, it will search for the class matching the type.
If it can’t find a matching bean or there is more than one possible match
(after considering any @Qualifier annotation and the name), Spring will
throw an Exception and fail to start.
You should use interfaces to further decouple different classes. This
way different components can be tested independently and not rely on
the implementation of other components. Tight coupling in enterprise
applications leads to brittle code and makes it very hard to make changes
without breaking anything.

© Adam L. Davis 2020 9


A. L. Davis, Spring Quick Reference Guide, https://doi.org/10.1007/978-1-4842-6144-6_3
Chapter 3 Dependency Injection

You can use @Qualifier to specify a specific name of an instance to help


@Autowired find the right instance when many instances of the same class
or interface might exist. We will show an example of this in the next section.

Configuration
Beans can be configured in one of three ways: XML, a configuration Java
class annotated with @Configuration and methods annotated with @Bean,
or on the Bean class itself with an annotation such as @Component. The
most recommended way is using one or more Java configuration classes.
A configuration Java class annotated with @Configuration might look
like the following:

@Configuration
public class Configuration {
  @Bean
  public MyService myService() {
    return new MyActualService();
  }

This configuration creates one bean instance of the Configuration class


itself and one bean instance named myService of class MyActualService which
implements the MyService interface (from the method annotated with @Bean).
Any configuration class must be nonfinal and nonlocal (public) and
have a no-argument constructor. Spring proxies the class using CGLIB
by default in order to enforce Spring bean dependency rules (which is
why the class cannot be final). For example, this allows method calls
to always return the singleton Bean instance instead of creating a new
instance every time. If this behavior is not needed, you can supply
proxyBeanMethods=false like the following:

@Configuration(proxyBeanMethods = false)

10
Chapter 3 Dependency Injection

The default scope is “singleton,” meaning one instance or


“singleton” of the class will exist for the application. Other scopes such
as “application,” “request,” and “session” exist in a web application.
The “prototype” scope means a new instance will be created of the
bean every time it’s requested. A bean’s scope can be changed using
the @Scope annotation. For example, @Scope("prototype")
@Bean public MyService myService() {...}

Every parameter to a method annotated with @Bean will be autowired


by Spring (using the same rules that apply to @Autowired). For example,
in the following configuration, the service2 bean will be wired to the
myService bean:

Listing 3-1. Configuration.java

@Configuration
public class Configuration {
  @Bean
  public MyService myService() {
    return new MyActualService();
  }
  @Bean
  public OtherService service2(final MyService myService) {
    return new MyActualOtherService(myService);
  }

By default Spring uses the method name as the Bean’s name. So


the preceding example creates a Bean named “myService” and a Bean
named “service2”. You can override it by supplying a value to the @Bean
annotation (like @Bean("myname")).

11
Chapter 3 Dependency Injection

Using @Qualifier, the “service2” method could be rewritten as follows


(with the same outcome):

  @Bean
  public OtherService service2(@Qualifier("myService")
MyService s) {
    return new MyActualOtherService(s);
  }

In this way, even if multiple beans exist that implement MyService,


Spring will know to choose the one named “myService”.

You can also configure a bean to have multiple names. For


example, using @Bean(name={"myname1", "myname2"}) would
register the same bean under two names, myname1 and myname2.

Application Context
The ApplicationContext is the interface that directly exposes all of the
beans configured by Spring.
It has a different concrete class depending on the type of application.
For example, a web application will have an implementation of
WebApplicationContext.

Component Scanning
You can use component scanning in Spring to scan classes for certain
annotations on the class declaration. Those annotations are @Component,
@Controller, @Service, and @Repository (and @Configuration). If they
are found, Spring will initialize that POJO as a Spring Bean.

12
Chapter 3 Dependency Injection

Component scanning can be configured through XML like the following:

<context:component-scan base-package="com.example"/>

or in a configuration class like this:

Listing 3-2. Configuration.java

@Configuration
@ComponentScan("com.example")
public class Configuration {

In these examples, the “com.example” package and all of its subpackages


will be scanned for Spring annotations to create beans. Be careful not to scan
too many classes as this will slow down initialization time.

Import
You can import other configuration files using @Import. Using
@ComponentScan can also be used to scan for configuration classes (classes
marked with @Configuration).
If you really need to, you can also use an @ImportResource annotation
to load XML configuration files, for example:

@Import({WebConfig.class, ServiceConfig.class})
@ImportResource("dao.xml")

This would import the WebConfig and ServiceConfig configuration


classes and the dao.xml Spring configuration file (see the next chapter for
more about XML).

13
Chapter 3 Dependency Injection

Laziness
Beans are created eagerly by default – which means Spring will instantiate
them and wire them up at start-up time. This makes it faster to find any
potential problems. You can make a Bean load lazily using the @Lazy
annotation if you don’t want it to load until necessary (when requested for
using the ApplicationContext.getBean(String) method or requested by,
e.g., autowiring).

Shut Down the ApplicationContext


In a web application, Spring already gracefully shuts down the
ApplicationContext. However, in non-web applications, you need to
register a shutdown hook.

Listing 3-3. App.java

public static void main(final String[] args) throws Exception {


  AbstractApplicationContext ctx
  = new ClassPathXmlApplicationContext(new String []
{"beans.xml"});
  // add a shutdown hook for the above context...
  ctx.registerShutdownHook();
  // app runs here...
}

This way, Spring will gracefully shut down when the application exits.

BeanFactoryPostProcessors
The BeanFactoryPostProcessor interface can be implemented to change
bean configurations before the beans are created (of all other beans). This
can be useful for adding custom configuration, for example (although

14
Chapter 3 Dependency Injection

Spring handles most useful cases by itself ). The BeanFactoryPostProcessor


interface has one method to define, postProcessBeanFactory
(ConfigurableListableBeanFactory beanFactory). Spring
automatically detects beans that implement this interface.

BeanPostProcessors
An ApplicationContext also automatically detects any beans that are
defined in the configuration metadata it receives that implement the
BeanPostProcessor interface. These beans are special because they are
created at the same time as the ApplicationContext and before any other
beans so they can process other bean definitions.
The org.springframework.beans.factory.config.BeanPostProcessor
interface consists of exactly two callback methods:

Object postProcessBeforeInitialization(Object bean, String


beanName)
  throws BeansException

Object postProcessAfterInitialization(Object bean, String


beanName)
  throws BeansException

Spring AOP, which we will cover later, is implemented using the


BeanPostProcessor interface. It can replace each bean with a proxy of
that bean.

15
Chapter 3 Dependency Injection

Init and Destroy Methods


You can enable JSR-250 annotations like @PostConstruct and @PreDestroy
using the CommonAnnotationBeanPostProcessor in Spring. It’s activated
by component scanning but otherwise can be activated directly in your
Spring configuration.
An alternative is to use Spring’s built-in configuration. For example, the
Bean annotation, @Bean(initMethod = "up", destroyMethod = "down")
would cause Spring to call “up” after initializing the class and injecting all
dependencies and “down” right before destroying it.

Properties
By default, Spring Boot will load properties from your classpath from a file
named application.properties (for standard properties) or application.yml
(for YAML-formatted properties).
Additional properties can be loaded into the environment using the
@PropertySource annotation.
For example, the following loads a property file named app.properties
from the classpath under the /com/acme/ directory:

Listing 3-4. AppConfig.java

@Configuration
@PropertySource("classpath:/com/acme/app.properties")
public class AppConfig {
  //configuration code...
}

16
Another Random Scribd Document
with Unrelated Content
"But the fact of it is," said Lance lightly, "that he saved my life. Ever
heard it said that if you save a man's life, he's sure to do you a bad turn?
Look out for me, Brooke."

"I'll look out for myself," was the unamiable reply.

"But it's only if you save from drowning that the proverb applies," said
the host.

"Well, this was drowning. River suddenly rose while the column was
crossing; and the last men got washed away. But this is spoiling my yarn.
I'll keep it for when Brooke isn't about."

"I told you I should spoil sport if I came," said Brooke grimly.

Melicent looked at him with some amusement

He was a fair man, severely tanned by exposure. He was clean-shaven,


and the salient feature of his face was his large, finely-cut, strong yet
delicate mouth: a mouth which lifted his otherwise rough-hewn face up to a
different level, and made it full of possibilities. With such a mouth a man
might be a poet, a soldier, a statesman; but whatever he was, that he would
thoroughly be. He was also shy, to an extent that was amusing in such a
Hercules. When he spoke, he muttered: and he hardly ever raised his eyes.

The gentlemen did not linger over their wine. Mayne was anxious to
talk to Melicent of her future, and Lancelot was astonished at himself for
the anxiety he felt to return to the drawing-room. He remembered a day
when he had seen a slip of a girl seated on Tod's Trush, and how he had said
to Helston: "One is conscious of a personality." He was vividly conscious of
it now. It was the "indefinable something" that Melicent possessed. She
never spoke much, but always gave the fascinating impression of vast
reserves behind, of a boundless store from which she could give more, and
always more.

He was vexed with Mrs. Helston for engaging him at some length in
talk, which she did advisedly, to allow Carol to talk to the girl.
It was with interest and satisfaction that Mayne listened to her, and
found out how soon she hoped to be self-supporting, and how close were
the ties that bound her to her friends. There seemed no cloud upon her
horizon; life, which had begun so stormily seemed, like many a rainy
English morn, to be breaking out into a cloudless sky.

"But there is one thing I want to ask you about," said Melicent
presently. "I have one wrinkle among my rose-leaves. It is only a little
thing, yet at times I fear it I have a constant dread that ... you know who ...
may turn up. I expect it is very silly of me. Men soon forget these things;
and in so long a time, he is sure to have forgotten. But I have wished to see
you, to make sure. I didn't like to write about it. I can't help a dreadful kind
of feeling rushing over me at times, that he..." she looked round. Nobody
was in hearing but Captain Brooke, idly turning over music on the piano;
she dropped her voice—"that Bert Mestaer—may still think he has a claim
on me."

There was a silence, which the chat of the group by the fire did not
seem to break. Captain Brooke earnestly studied the song he was reading.

"That idea—the idea that Mestaer might still think of you—would not
be pleasant to you?" asked Mayne.

"Pleasant?" the word was a gasp. "But you see the life that is mine
now," she said tremulously. "You remember the house of bondage—the
darkness and shadow of death."

"Bert Mestaer wanted to loose your bonds."

"Oh, no! Only to bind me to another master!"

"I think you wrong him there, Melicent."

She turned towards him, put out one hand, and laid it on his.

"It was you who saved me; you delivered my soul from the snare of the
hunter," she said. "If Mestaer let me go, you were the only man that could
have persuaded him. You know it; we need not discuss it. What I want you
to tell me is, whether you have seen or heard anything of him; whether he is
alive or dead."

"He was certainly alive when I left Africa. He did splendidly during the
war. I believe he is considered the finest scout in the British army. I feel
sure I may take it upon myself to say, on his behalf, that he will never make
himself obnoxious to you. You need be in no fear of him."

"He has forgotten all that nonsense about me?"

"I don't exactly know what you mean by nonsense, Millie. If you mean
his love for you, I don't think I can truly say that he has forgotten."

She made a little sound of dismay.

"But he is in process of forgetting—he must be!" she cried. "Anyhow,


he doesn't expect me to start off to Africa to keep the promise he says I
made?"

"Nothing could be farther from his thoughts, I assure you."

"Well, that is what I wanted to be sure of! Now I shall breathe freely
again. I will confess to you now, that I had a terrible moment this evening.
Mater said Mr. Burmester had come home, and laughed and asked me to
guess who was with him! I leaped to the conclusion that it was Bert
Mestaer, and I suddenly found myself in the grip of a blind terror. I thought
I should faint, all the horror of that dreadful time came back so clearly. I
don't think I could have faced him...."

But Lance was no longer to be held back. He broke away from his
captors, and came towards Millie, calling for a song. Captain Brooke, who
still stood forlorn and rigid by the piano, leaning his chin on his hand, was
roughly pushed away. Melicent sat down without shyness, and sang two or
three ballads in a voice that—like herself—was small and flexible and very
distinctive. The last thing she sang was that wonderful little piece of
inspiration,

"The night has a thousand eyes."


Captain Brooke was turning over for her.

"That's very true," he said,

"'The mind has a thousand eyes,


The heart but one,'"

he repeated thoughtfully.

"Yes," she answered; "yet many people seem content with the one! I
suppose all women used to be! Think what an awful fate, to look on life
merely as a matter of sentiment! The thousand eyes are better, don't you
think so?"

"I never tried," he answered simply.

The reply struck her as remarkable, but she had no time to reflect upon
it, for Lance again struck in:

"Seems to me wonderful, with a profession of your own, that you


should find time to learn to sing so beautifully," he said.

"The singing is my recreation," she replied, "the other my serious


work."

"Ah!" cried Lance, "and that reminds me of old Brooke's business and
the reason why he came here to-night! Do you know, Miss Lutwyche,
Brooke wants to build a house, and he's been reading a paragraph in the
Hauberk about a lady architect."

Melicent grew pink, and looked down.

"Captain Brooke won't want to give his work to such a complete


novice," she said demurely. "Now that he has seen me, he will want to retire
gracefully from his intention, and you put him in a cruel dilemma by
mentioning it."
"I like trying experiments," said the Captain, with more animation than
he had yet displayed.

Everyone was now crowding with interest around the music-stool where
Melicent sat.

"What and where would your house be, Captain Brooke?" asked
Helston.

"It would be in my—my—the place my people come from," he replied.


"It's in Wiltshire."

"Wiltshire! That's a variable county; on Salisbury Plain?"

"No; it's a pretty village. Clunbury, they call it."

"What kind of house do you think of building?"

"I should leave that entirely to Miss Lutwyche."

"I say, Melicent, here's your chance!" cried Helston mischievously.


"You'll be able to send another paragraph to the Hauberk?"

"How dare you?" she cried, threatening him in mock rage. "Oh ... but
this is wonderful! Are you serious, Captain Brooke?"

"Quite. I have bought the land. Only about twenty acres. I should like
your advice about the actual site of the house."

"Well, Millie, if you give satisfaction over this, your career is made,"
cried Brenda.

"But what kind of house do you want?" cried the girl. "You must tell me
that!"

"No; that's what I shall pay you to tell me," said Millie's client calmly.
He smiled for the first time, as he added: "You have the thousand eyes."
"Well!" said Melicent, "the agitations of this day have been quite too
much for me!"

"Do your people live at Clunbury?" asked Helston of the Captain.

"Oh, no; not now. They sold their last acre in my grandfather's time. A
churchyard full of their graves is all that is left. It is, however, a part of their
land that I have bought back."

"That is the kind of thing I would like to do myself," said Carol Mayne.

"Now, Miss Lutwyche, is the house rising before your mind's eye?"
cried Lance, pleased at the intense interest created by the scheme.

"Not yet," said Melicent; but her eyes were dreamy. "What kind of
people were your forbears?" she asked the Captain.

"Merely yeomanry," he answered, "and wholly Philistine; people with


one eye."

"And do you want the house to resemble them in tone?" she asked,
smiling at his allusion.

"No. I want it to be the typical house that is in your mind; the house you
would live in, if you could choose."

She laughed.

"Take care! You don't know how lordly my ideas may be! You will have
to bring them down to the level of estimates."

"Do you want the thing put in hand at once?" asked Helston.

"Yes, I do. I should like Miss Lutwyche to come down and look at the
site before I go to Ilbersdale for Easter."

"Well, Millie, you must make up your mind! Do you accept the order?"
cried Carol Mayne.
"I should like to come down and look at the site before I finally say
Yes," said she. "And ask Captain Brooke all manner of questions."

"That will suit me well," he replied gravely. "To-day is Monday. Shall


we say Thursday?"

CHAPTER XXI

MIRAGE
"He who has seen a city in the skies
Knows he may never cool his tired eyes
At the fair waters of that Paradise.

But the one moment when he thought his feet


Would enter that dream-city, was so sweet
That he can bear the noonday and its heat."
—ALICE HERBERT.

The sky was clear and starry; the night was swept by the strong, clean
current of the March wind, as the three men stepped out into Collis Square.

"How shall we get back?" asked Burmester, lighting his cigar. "Train,
tube or bus?"

"I shall walk," said Brooke, with brevity.

They were standing just beneath a street lamp, whose strong light,
falling on his face, showed it haggard and strained. Burmester did not
observe it.
"You don't catch me!" he cried jovially, flinging away his light. "Come
on, Bishop—leave that maniac to his own devices. Here's a hansom, the
very thing."

The jingling cab pulled up at his signal, and he sprang in. "Rhodes
Hotel!"

"All right, Burmester, I'm walking a bit with Brooke," said Mayne.

"The deuce you are! Nice trick to play on me!" cried Lance, as he was
bowled away.

"Why can't you go with him, and leave me to myself?" growled Brooke,
lighting a pipe with a hand that shook.

"Because I want your society, though it seems the desire is not mutual."

There was no reply. They tramped eastwards in silence, past the Marble
Arch, down Park Lane into Grosvenor Square, and on into Berkeley Square,
where suddenly Brooke said:

"I wish you would go."

"You're not playing fair," quietly replied Mayne. "Conspirators ought to


share confidences."

"Confide away then."

"All right, I will. I am as pleased as I feel sure you must be, though you
don't show it, at the result of your idea."

"Pleased!" echoed Brooke. "Pleased! ... Great Heaven! Pleased, are


you? But then, you see, I am not you. Bishop, I know every line of her face,
every tone of her voice, though I never heard but one in the old days! I
know her as a man knows the land where he was born; and she could sit
looking full at me across the table, and not know she had ever seen me! ...
Man! How have I come through it?"
"Excellently. I don't understand you. Surely it is what you were hoping
for, planning for—complete non-recognition? What would have happened if
she had known you? You heard what she said to me about you?"

"Every word;" his voice sank to a despairing whisper.

"She is at least consistent," said Mayne.

An inarticulate murmur of assent.

"I don't think the non-recognition wonderful," went on Mayne. "You


see, she never thought about you, or even looked at you attentively in old
days. And think what you were like then! Not only the outer man has
changed. Remember that I myself, when first I saw you without your beard,
and without your slouch, and without your oaths—in your uniform, drilled
into a self-respecting Englishman—I did not know you."

"But you did, as soon as I said: 'Don't you remember me?'"

"Exactly; because you did say so. But you have not said so to Miss
Lutwyche; and don't you see that your very failure to do so would banish
the idea of your possible identity from her mind? You come before her with
looks, words, manners, your very nationality—all changed! An English
landed proprietor! Doubtless she knows nothing of the great diamond find
on the High Farm, nor of the fortune you have realised. The idea that you
should adopt such a method of gaining access to her, would never strike her,
it would not seem characteristic of her preconceived idea of you."

"I don't know how I got through," said the Captain brokenly. "When she
came in, looking like an angel from God ... and passed me by and went up
to you! By George, Mayne, she was right! It was you who saved her! But
for you—"

"She was wrong; it was you," said Mayne. "She will probably never
know the fight you made; women don't understand these things, and it is as
well they don't. Things go like that in the world."

"She's beautiful, Mayne; don't you think so?"


Mayne laughed.

"I don't think her at all angelic," he replied, "but I will own that she
seems to me less unlovable than I used to think her in Africa. Don't punch
my head! ... Burmester admired her, I thought."

"Yes, confound him!"

"But you have made a splendid opening. The idea of the house was a
masterly one. It gives you endless opportunities and a common interest.
Only remember, you must keep yourself well in hand. As I warned you, the
game is a dangerous one. One false move may cost you all."

"The worst is over now," returned the Captain. "The awfulness of


feeling that she's everything to me, I a nightmare to her! I can still hardly
believe she didn't know me."

"Everything was in your favour. She was full of my return, and of relief
that it was I, not you. The silent Captain Brooke was a negligible quantity."

"She never looked at me squarely but once. That was in the middle of
dinner. My heart nearly stopped. I had to lower my eyes lest they should say
things. Ah, well; you're a good sort, and no mistake. I'm glad we've talked it
out, though I was a sulky brute at first."

"H'm! Yes; Melicent might think the change in you not so deep if she
had heard your way with me this evening," said his friend drily. "The old
Bert is still there, in spite of all the polish."

Bert laughed as he strode on, with his long, swinging step. He made a
fine tribute to the creative powers of Sergeant What's-his-name. There had
been good material to work upon, and the right kind of training; and the
result was something like a miracle.

In the old days, Mayne had realised that this man was something out of
the common: but even he had not been prepared for his persistence, nor for
his wonderful flair for knowing the right men, reading the right books,
doing the right thing. During all these five years, no week had passed
without the exchange of letters between those two. Mayne had sent up
books, had cheered and inspired his pupil, had never let him feel that
nobody cared. Bert had bent all the powers of his strong mind and still
stronger will towards the attainment of his one idea. His life had been a life
of monastic purity, of iron self-control, of self-denial and constant effort. It
was hard for the priest to believe that such a wonderful thing could fail of
its reward. But he had been troubled at what Melicent said that evening. He
almost made up his mind that he would tell her something of what her
influence had meant to Bert. But his final decision was for complete
inaction in this most delicate matter. Bert must fight his own battle, and win
his own victory. The time had come for his friend to stand aside.

Far into the night Mayne was considering the case. He, with his unusual
insight into souls, had found a certain egotism and hardness in Melicent.
The hardness was inherent—it had always been there; and her present life
of independence and success was likely to foster it. Did she know, at that
moment, that a man was in London who had spent five laborious years in
fitting himself for her conquest, as a nation may equip itself for a great
campaign—and who was bent solely upon that quest—he felt pretty certain
that her only impulse would be to escape from him, to guard her own
freedom, to determine resolutely never to be enslaved.

Would the constancy and persistence of the man be a match for the
hardness and self-will of the woman?

He thought Bert might stand a better chance of winning, were it not for
the bitter memories which were bound up in the girl's mind with him. That
she should long remain in ignorance of his identity was inconceivable: and
when she recognised him—what then?

Bert was his own spiritual son; his desire for his success was intense.
But now that he had seen Melicent, he was full of doubts. Carefully as Bert
had educated himself, the gulf between them was still wide.

He could do nothing but pray.


CHAPTER XXII

RECOGNITION
"Go from me. Yet I feel that I shall stand
Henceforward in thy shadow. Nevermore
Alone upon the threshold of my door
Of individual life, I shall command
The uses of my soul, nor lift my hand
Serenely in the sunshine as before."
—SONNETS FROM THE PORTUGUESE.

It had been arranged that the fledgling architect should be accompanied


by Mr. Helston, and have the benefit of his knowledge and experience when
she went down to look at Captain Brooke's estate at Clunbury. But fate
decreed otherwise. On Thursday morning Mr. Helston was in bed with a
high temperature and sore throat. A railway journey on a raw, gusty day in
early spring was out of the question for him; and Melicent was obliged to
go alone.

Brenda suggested something about her being unchaperoned, which was


met by the young lady with unspeakable scorn.

"Better throw up my profession at once, if Mrs. Grundy is to have a say


in my business arrangements," she remarked; and caught her train at
Paddington with professional composure.

She alighted at a small station on a branch line, which was the nearest
point to the village; and as she stepped from the compartment, Captain
Brooke approached, in a suit of country tweeds, gaiters and knickerbockers.
In such guise he reminded her of her beloved Dalesmen, and the idea gave
kindness to her smile of greeting.
As he approached, she noted that he looked pale under his tan, and
seemed not perfectly ready to speak at once.

"So Mr. Helston was unable," he brought out, after manifest hesitation.

The girl looked surprised.

"I am so sorry! He is in bed with a severe chill. I bring you his


apologies. But if you think he is indispensable—" she added, as an
afterthought, puzzled by the disturbance visible in his face.

"Oh! by no means. It is good of you to come alone," he said hurriedly.


"This way, please; I have only a hired trap at present, and am putting up at
the inn near here, which is two miles from the village. I've ordered lunch,
but it won't be much good, I'm afraid; these English country inns are
astonishingly bad."

"Please don't apologise," she said. "I am used to roughing it, and I like
it."

He smiled, as he tucked her into the dog-cart, and remarked, as he


climbed to his seat beside her.

"Collis Square didn't seem very rough to me."

"Ah! But you haven't seen me at work. I can lay bricks, mix mortar,
point walls—it's delicious."

He laughed. "I feel sure you could do anything you tried," he said.

They drove on briskly, through a lane whose hedges were beginning to


show bronze buds upon their blackness. The sky, after some boisterous sleet
storms, was washed a clear, pure blue. A faint golden haze of willow catkins
brooded over the adjacent brown copses, and the wet sparkles on the bare
boughs threw back the sunbeams. Here and there the lazy reek from a
cottage chimney hung pearly against the indigo fir woods—a typical
English April, and a typical English landscape.
"Do you like this country?" he asked abruptly, and his tone seemed to
imply that he thought anybody must.

She made a conventional answer that it was very pretty.

"Perhaps you don't care for scenery?" he inquired anxiously.

She turned to him laughing.

"Oh," she said, "scenery is my particular fad. But this is too tame for
me. You should see my Cleveshire moors and dales!"

His silence, in some inscrutable way, conveyed to her the idea of


extreme mortification.

"Do you mean," he presently asked, "that you wouldn't care to live in
this part of England?"

"I shouldn't choose it," she replied carelessly. "But then, I have no links
with it. I quite appreciate your reason for choosing it."

"You do?"

"Undoubtedly. Your ancestry drew their living from this soil; they ate
the corn it grew, the cattle it fed. In a real sense, you are part of this little bit
of little England. There must be something in you that is in mysterious
sympathy with it."

"That's how I feel," he replied, as though gratified to be so interpreted


by her. "But I admire the country for itself too; it seems a great pleasure-
ground—a sort of park laid out by God Almighty."

"I like more mystery, more wildness."

"I've had enough wildness," he answered very determinedly. "I like this
because of its cultivation and fertility and order."

"I'd like to show you Fransdale," she said, smiling.


"I hope you will," he replied. "I'm going to Ilbersdale, you know." He
reflected for some minutes, then said: "Should you advise me not to decide
on this till I've seen the other?"

"What!" cried Millie, "when you've bought your land, and found your
ancestors and all! I never heard of such a thing."

"I might put up a shooting-box on the moors," he said reflectively.

"You must be very rich," commented the girl, in wonder.

"I suppose I am. I did a big deal in land out there," he replied.

Privately she thought he had more money than wits; but perhaps he
would make none the worse client for that.

They reached the inn, and he ushered her into the quaint, low parlour,
with the usual stuffed birds, coloured almanacks and corner cupboard.

During the interval before the appearance of the roast fowl and boiled
ham, she unrolled the drawings she had brought, spread them on a table in
the window, and described them to him. The sun streamed in at the lattice,
gilding her hair where it curled over and about the edges of her wide, flat,
dark-blue cap as she sat absorbed in her plans and ideas. Her companion
drank in the details of her dainty presence—from her fine skin to her firm,
little hands, from her natty, embroidered collar to the strong, laced boots
appearing below her short blue serge skirt. He was considering whether he
found her more adorable in the lamplight in her white gown, or in the
sunshine, in her workmanlike, country suit Suddenly he was conscious that
he had failed to answer a question, and that a severe, surprised little face
was being lifted to his.

Their glances met; he had a moment's awful apprehension. It seemed to


him that she had caught him unawares without his mask. He had no notion
what was the question she had asked, and he floundered desperately.

"You were saying—I am such a thundering ass—my mind had gone off.
I was thinking that you can see the Lone Ash, where I want to build—from
this window—there. That hill to the left—"

The inn maid-servant, bringing in the lunch, saved him.

But his moment of confusion, so much greater than the occasion seemed
to warrant, had jarred the smooth, impersonal nature of Miss Lutwyche's
opinion of him. There had been so remarkable a look—almost of
consternation—in the man's eyes as he faced her. She had been at some
pains to expound the main principle of the Lee-Simmons system of
drainage for isolated houses, which was her special fancy, and which she
was most anxious to have him adopt; and it was certainly annoying to find
that she had been speaking to deaf ears. But his curious expression when
she had looked at him! He had seemed like one suddenly caught in the act
—taken red-handed. What could the thought be which had absorbed his
attention, and reddened his brown cheek?

She was so kind as to repeat her information while they sat at lunch
together, and had no cause this time to complain of lack of attention. But his
momentary lapse had occasioned in her a subtle change of mental attitude.
She was, without knowing why, suddenly on her guard—all at once
concerned with this man, about whom before she had not thought at all.

Of course she did not say this to herself. Like all deep-seated motions of
the mind, it was spontaneous, unrealised. But it was there; and the man
encountered it, felt it with his alarming sensitiveness where she was
concerned; and by degrees there arose up within him a profound uneasiness,
which made the simplest sentence an effort.

Melicent soon settled, in her positive way, what was wrong. She thought
the Captain, being rich and eligible, was nervous of being tête-à-tête with
his youthful lady architect. She spoke with elaborate ease and unconcern,
determined to show him there was nothing to fear; but he seemed each
moment more self-conscious.

There was, nevertheless, no doubt that he was interested—not only in


the speaker, but in what she was saying. By the time lunch was over, he had
practically decided upon the Lee-Simmons idea, and was eager to transport
his architect to the scene of her enterprise at once. He went outside to the
little rough plot of green before the inn to find the ostler; and urged by an
impulse of such curiosity as she seldom felt, Melicent went to the window
to watch him.

A few village children were at play upon the green; and one little girl,
probably inspired by parents who hoped for some advantage from the rich
man who was going to make his home among them, shyly approached him
as he stood.

He had put his hands behind him, and forgotten himself in staring at the
hill crowned by the Lone Ash, where he meant his fairy palace to arise. The
little fair girl advanced diffidently, shyly holding out a big round bouquet of
primroses, tightly tied together. He turned, looking down at her, half-
amused; and Melicent thought that the big, fine man and the blushing child
with her flowers, illumined by the crude spring sunshine, looked like the
coloured supplement to a Christmas Number.

The Captain accepted the flowers, felt in his pocket for a penny, and
turned back towards the inn door, with the intention of presenting the floral
tribute to Miss Lutwyche.

Now, what was there in that action—what sudden thrill of memory—of


recognition—of pain, like a sharp blow on a raw spot—darted to the brain
of the girl who watched in the window?

She had seen a man come into a room once, with a bunch of flowers in
his awkward, unaccustomed hand; she had heard the slapping thud with
which they had been hurled into the grate.

"So you'll break your word!"

It seemed to her that the words were spoken aloud, now, at this moment,
in the room. And a blinding light illuminated her. She knew, as completely
as a moment before she had ignored, that Captain Brooke was none other
than Bert Mestaer.

Waves of cold and heat, sudden dizziness clutched her. He was coming
in—in a moment he would be there—she could not face him.
Terror prevented unconsciousness. Catching at the furniture, she
staggered across the room to the inner room leading to the kitchen.

"Take me upstairs—a bedroom—I must lie down!" she gasped; and as


the maid-servant, scared by her white face, rushed forward and encircled
her with a strong arm, she gasped: "Don't say anything to Captain Brooke ...
please. I shall be ... better directly."

The girl half supported, half dragged her up the narrow stair.

"Dear miss, what shall I do? Burnt feathers? Key down your back?"
cried she distractedly.

"Is there—cold water? Yes, that's all. Go away please. Go! Come back
in ten minutes. Leave me alone now."

Melicent turned the key in the door, and sank upon the scanty feathers
of the rocky bed. For several minutes her one overpowering, paralysing
sensation was fear. She could not think at all.

She lay prone, while the surging currents of her nerves slowly settled
themselves and adjusted their balance. Her sense of outward things came
back to her by degrees. The fine cold air flowed through the little casement
with the sunshine. Wheels crunched upon the gravel below; a dog barked;
someone spoke; in the distance a cow lowed. The world went on as usual,
lapt in afternoon, rural peace. But from her skies the sun had dropped. The
nightmare that had pursued her for years was now beside her in bodily
shape, dogging her steps. Mestaer had come back.

How came it that she had not known? She answered herself bitterly that
it was because she had trusted Carol Mayne, and he had allowed her to be
deceived. Not for one moment did she now doubt Captain Brooke's identity.
The marvel was that she had not detected him at once.

This had been the first time of her looking at him, he being unconscious
of the fact of her observation; and in that moment he had betrayed himself,
she could not have told how.
And now in what a net was she caught! The thought of the man's
persistency turned her cold. She was committed to his acquaintance,
involved in a business transaction with him—he was going to Ilbersdale.
Even in Fransdale she should not be safe from him! And Carol Mayne had
connived at this betrayal!

It did not take her long to form a decision on one point; namely, that her
only hope lay in going on as if nothing had happened.

Surely she was capable of that! She, the self-contained, self-reliant


professional woman!

Reaction had set in. Passionate anger, active defiance succeeded fear. It
was quite simple, after all. She had stolen a march upon the conspirators
and surprised their plans. It was the best thing that could have happened.
She knew now what to guard against—could avoid intimacy and repel
advances.

Springing from the bed, she dashed water into the basin, bathed her hot
forehead, and was once more her own mistress, all her spirit, all her force,
summoned up to defend her liberty.

She peeped from the window. Captain Brooke stood waiting by the trap
below. His attitude betrayed a subdued impatience. Undoubtedly he was
much changed—completely altered from the man she had known. There
was real excuse for her non-recognition. But that he should have imagined
that such an incognito could be sustained! No wonder he had betrayed
nervousness that morning when he faced the idea of a day alone with her!

Well, they were equals now! He knew, and she knew. If she could
prevent his knowing that she knew, all would be well.

She snatched up her gloves, and ran lightly downstairs, not allowing
herself time to pause, but passing straight out into the sunshine to meet him.
CHAPTER XXIII

REBELLION
"——You knew not me
Master of your joys and fears;
Held my hands that held the key
Of the treasure of your years,
Of the fountain of your tears.

For you knew not it was I,


And I knew not it was you.
We have learnt, as days went by.
But a flower struck root and grew
Underground, and no one knew."
—MRS. MEYNELL.

"I'm afraid I've kept you waiting," she said a little breathlessly, as she
sprang into the cart.

"Oh, that's nothing, to a fellow who is always waiting," was his calm
reply.

"Always waiting! What for?" cried Melicent, wonder overleaping


discretion.

"For the future, I suppose," he answered, after a short hesitation.


Adding, as though suddenly conscious of being eccentric: "You know—that
endless chivying of De Wet got on one's nerves."

"I can quite believe it," said Melicent cheerfully. "But now, to-morrow
has come, as I used to say when I was a small child. You've made your pile
—you're an English landed proprietor. You're not waiting any longer."

"Oh, yes, I am. There's one thing I haven't got yet," he said, a slow,
curious smile curving his fine mouth.
He did not look at her as he spoke, which fact was her salvation. She
could rule her voice, but not the rebel blood that waved live banners in her
cheeks.

"Obviously," she returned lightly, "there must be a mistress for Lone


Ash when it is built. Is this what you're waiting for?"

Her own daring dazzled her. It was a thing that he could not possibly
conceive her saying had she had any notion of who he was.

"Yes," he answered quietly, "that's what I'm waiting for."

"And that's just what you'll never get by waiting!" she cried gaily.

He turned sharply upon her. "How do you know? What do you mean?"
he asked, amazed.

"If you want a wife, you must go in search of one," she answered
mischievously. "They don't drop into people's mouths."

"Well, that's what I will do," was his tranquil answer; "but one thing at a
time, you know."

"One thing at a time," she echoed, lightly; and as she spoke, he checked
his horse at the gate of a field.

"Here begins my property," he said, "and my idea is to have the drive


entrance-gate here, and the house over yonder, just below the brow,
screened from the road by those trees. The ground falls away to the south
and west, you will notice, but the Lone Ash hill would keep off the wind. I
want to know what you would think."

He had alighted, opened the gate, and led the horse and cart through.
Now he proceeded, striding over the grass, and Melicent, her arms round
her knees, forgot nervousness and bravado alike in her professional
enthusiasm. They passed a large cluster of barns.

"The house was here," he said. "The man who bought it found it too far
gone to repair, and knocked it down, leaving the outer shell for barn walls.
Not much of a place, you see. I don't know why they put it here, except for
the well. But there shouldn't be any difficulty about getting water. I sank a
shaft up yonder, where I am going to show you, and we struck good water
at thirty feet."

She found herself chatting to him about subsoils and surface water in a
wholly professional manner.

When he reached the place where he proposed to build, she found


herself unable to suggest an improvement. It was an ideal site—near the
village, yet secluded, sheltered, but not shut in—overlooking a bit of broken
ground which gave quite a prospect; and a regular trap for sunbeams. There
was little she could suggest by way of alteration; she grasped the main
features of his thought with instant appreciation. They sat down side by side
upon the trunk of a felled elm; she brought out her sketch-book, and drew
suggestions. By degrees a house shaped itself to her mind's eye—a house
full of pleasant detail.

The south front was to face a terrace; the drawing-room to be at the


western end, with two sunset avenues, converging upon the large door-
window. One was to focus the dying sun in winter, one in summer. Both
were to be grass walks, cypress-bordered, and they were to lead to a
rectangular fish-pond, set with lilies, and reached by shelving steps. Beyond
the fish-pond, a warm brick wall, with deeply alcoved seats.

The cypress-edged grass walks were her special fancy.

"But don't have them unless you like," she earnestly advised. "Some
people think them sad."

He would have had hop-poles at her recommendation, but he managed


to appear genuinely convinced.

Then, in fancy, his architect wandered back to the house—to the hall,
with its two-branched staircase, and the windows in the gallery above.

"This house will be plain grey stone," she said, "and its roof will be of
tiles, to prevent the effect being too cold. We shall try to pick up tiles that
are already weathered, so that it may not look too new. I will not introduce
anything that is a deliberate imitation of what was old, such as timbering,
barge-boards, or painted woodwork. You shall have no grotesques; you
must not yearn for a letter-box shaped like the Ace of Spades, as they have
in Hampstead, nor for garrets with the window set at the end of a tunnel, as
one sees in all the new toy suburbs. Our gables will be few; our roof shall
not be cut to pieces. All our lines shall be simple, and our chimney-stacks
things of beauty."

Her face was rapt as she sat looking at the bare ground where in fancy
she saw her creation taking shape. Captain Brooke, sitting at her side, let
himself go for a brief moment, gazing his fill upon the face that was always
graven on his heart. It did not take her long to become conscious of the
scrutiny of his steady eyes. The moment that he saw she had come out of
her dream, he rose, and walked away to the excavations his workmen had
made, returning with lumps of marl and chalky soil in his hands, and quietly
making a remark about foundations.

As they plunged into the discussion of builders, estimates, contracts,


etc., she realised that she was full of reluctant admiration for him. How well
he bore himself! How completely he was master of his feelings! She felt,
she knew, that he was entirely to be trusted. His speech was correct, his
bearing dignified; nobody would now take him for anything but an English
gentleman. Five years had wrought all this in him. How persistently he
must have striven; how hard he must have worked!

And all this, she must conclude, had been done for her—for one whose
heart was wholly untouched by any answering feeling—to whom the mere
thought of him was pain and humiliation—who asked nothing better than
never to see him again.

As the thought of her present position flooded her again, she felt so
strong an impulse of resentment that for a long moment she was inclined to
throw down her plans, rise and denounce him—repudiate his claims, break
the chain that seemed to hold her, leave him where he stood, and flee from
him for ever. How could she go on like this, now that she knew? Did not
every moment that passed leave her more deeply committed to the
incredible situation?
Never did she remember before to have been the victim of indecision.
Now she, the self-poised, self-sufficient Miss Lutwyche, was swayed to and
fro like a reed in the grip of opposing passions. Terror drew her one way,
pride and ambition another. Under all, the mainspring of all, though she
knew it not, the desire to defy Bert, to pay him back in his own coin, to
seize his masquerade and turn it into a weapon for her own use, to punish
him withal.

And all the while the rollicking April wind sang in the tree-tops, the sun
moved westward, the light grew mellow, till the lump of earth in the
captain's hand gleamed like a lump of gold. And his architect walked to and
fro beside him; paused here, moved on again upon a new impulse;
measured out the dimensions of things with her long builder's tape, and
caused the owner to stick little white bits of wood, marked with weird
symbols, into the ground at certain intervals. So they stood and talked, each
ignorant of the storms that swept the other.

The surface of the girl's manner—easy, impersonal, remote—was never


once impressed by the tremendous undercurrent that lay below the man's
cool utterances. She was thinking: "After all, this is quite easy. I could keep
it up for ever."

He was telling himself—"This sort of thing can't go on. Could I bear


another day like this?"

Suddenly, it was over. She looked at her watch and announced that she
must catch the 5.10. For a moment the thought that the strain he had been
feeling so acutely was to be forthwith relaxed, gave him so sharp a sense of
loss that he could not immediately speak. When he did, it was to beg her to
come back first to tea at the inn. She firmly declined this. The inn, to her,
was horror-haunted. The ghost of her past had risen there to dog the
footsteps which she had believed were free. She replied that she would have
an hour at the junction in which to get tea, and must not stop now.

They returned to the dog-cart, and drove back, in so brooding a silence


on his part, that she dashed into small talk, lest he should be contemplating
some rash words. As they drove past the inn, she averted her eyes that she
might not see the green, or recall what had stood there. The vision of poor
Bert, with his bashful, uncertain smile, his ridiculous flowers, his hesitating
advance, rose before her, creating sheer nausea. Once more she was lying in
the parlour at High Farm, once more she felt the agony of her wounds, the
scars of which must to this day be hidden from her dressmaker. The crimson
of shame suffused her. Oh, if he could but have kept away! Usually she
managed to forget all this—to forget that she was branded, physically and
morally, by the searing flames of degradation. He was the living reminder
of all she hated and rejected.

She fell silent, unable to continue her babble; and Bert was silent too.
But as they neared the railway, and he found moments running short, he
made a spasmodic effort at conversation.

"You were brought up in Africa, were you not?" he asked, as casually as


he could. He might as well have held a match to gunpowder.

She turned upon him with a deadly quietude.

"Never speak to me of it," she said, almost between her teeth. "I have
forgotten it all. Every memory, of place or people, revolts me. There is
nothing that ever happened there, and nobody I ever knew there, except Mr.
Mayne, that inspires me with any feeling but horror."

They were turning into the station yard. He made no reply to her words
until he had brought the pony to a standstill; then, turning fully to her, he
said, very simply:

"I beg your pardon."

Something in his dignity shamed her. He helped her down in silence,


collected her odds and ends, felt under the seat, and brought out the fatal
bunch of primroses, which he carried to the platform.

As they stood waiting, she said, hurriedly and nervously:

"I am sorry, Captain Brooke. I didn't mean to speak so horridly about


Africa. I hope I didn't hurt your feelings."
"My mistake," he returned good-humouredly. "We're such slight
acquaintances, I expect it was pretty cool cheek of me to ask you a personal
question. I'm afraid there are a good many holes in my manners."

No man could have shouldered the blame more naturally. The train
came in. He found her a carriage, and handed in her things to her; then
shyly offered the flowers.

"A little village kid gave me these," he said; and she thought, as he
spoke, how fine a head and shoulders he had, framed in the square of the
open window. "I thought you might like to take them to town with you."

She just managed to say, with a vague smile, "Thank you." Then the
train started, he had raised his hat, stepped back, and she was in solitude.
For full five minutes she sat motionless, crouched together, her two hands
gripping the seat, her eyes fixed on the unoffending primroses, whose
delicate, mysterious fragrance stole towards her on the evening air.

At last, with a strangled cry, she sprang to her feet, seized them, hurled
them with all her force through the window; and then, sinking back into her
corner, burst into wild, ungovernable tears.

CHAPTER XXIV

UNREST
"Let me alone! Why must you claim me? I
Am woman—do you tell me I must lie
All passive in Fate's arms until I die?

I must not care for Art, nor crave to be


A force in this fair world—'tis not for me
To live my own life. Was I made for thee?
No! I am rebel! Through life's open gate
I pass alone, and free; you come too late!
Or is't too soon? I know not; let us wait."

Carol Mayne passed all that day in a state of feverish anxiety. In the
evening he suggested to Lance that they should go round to Collis Square.
It was late, but it was their only chance to call upon Mrs. Helston before
leaving town. They arrived about half-past eight, and found Brenda in the
drawing-room, and with her Theo Cooper, who was a frequent visitor.

It was now twelve months since this young lady had defied parental
authority and gone on the stage.

She was conspicuously unfitted for such a life, being pretty in a showy
way, forward and giddy. But her parents' very natural opposition did not
weigh at all with her. They had so often objected to what was wholesome,
reasonable, and harmless, that their opinion had no weight with any of their
children. With their habitual reserve, they suppressed entirely their deeper
reasons for objection, and the only one they ostensibly urged was: "What
will people say?" To a girl whose one hope was to be notorious, this was no
deterrent.

The affair of Gwendolen and young Freshfield had produced a curious


effect in the Vicarage family. The strenuous efforts of Mr. and Mrs. Cooper
to hush it up had been successful as regards their neighbours; but this
success had been dearly purchased at home at the cost of lowering their
children's estimate of them. These merciless critics had now discovered that
whatever they did would be condoned, sooner than let the world suspect a
family breach, or a family scandal. Mrs. Cooper's own theory of her
perfection, and of her success as a wife, mother, and leader of conduct in
the village, must be preserved at any sacrifice of truth.

Gwendolen and Madeline were despatched to school, the governess was


dismissed, and all went on as usual. But from that moment each child took
his or her own line.
George, the eldest, whose sulky protest against taking orders had been
wholly ignored by his father, ran into debt at Oxford, failed to take his
degree, and finally bolted to America, whence he wrote for funds at
frequent intervals.

Willie, the next boy, who had some ability, after various letters and
conversations which left the vicar enraged, humiliated, well-nigh heart-
broken, had gone to reside with an agnostic community in East London. He
was just the man they wanted—his intellect exactly of the calibre which
quickly assimilates specious argument, and reproduces it in an attractive
form; and the Fraternity of Man paid him one hundred pounds per annum to
teach men brotherhood, while denying meanwhile the one great antecedent
fact of common Fatherhood.

Gwendolen, on leaving school, found herself unable to live at home,


and had gone to teach English in a Russian family at St. Petersburg.
Madeline remained at the Vicarage, nominally as governess to Barbara and
Beatrice; she was the weakest of the five, and the most deeply influenced
by her mother.

Theo would have been a very pretty girl, with a little good taste to guide
her. But, coming up from the lonely spot where her life had been spent, she,
with quick receptive capacity, imbibed notions of dress and coiffure from
the girls in the omnibuses in which she travelled. She wore, as Melicent
once remarked, a quantity of cheap clothes, extravagantly put on.

A bright-coloured silk blouse, low in the neck, beads, artificial flowers,


a becoming hat, but too large—atrocious boots and a reek of scent—these
must have convinced anybody of the good ground Theo's parents had for
thinking her unsuited to go about London independently. Without conscious
intent, her whole appearance laid her open to the chance of being mistaken
for quite other than she was; and she had all the vain-glorious self-
confidence of a very young, very ignorant girl. If she came off scatheless, it
would be because her type is so plentiful, and by no means because of her
discretion.

Carol Mayne, when presented to this young lady, as one of Melicent's


Fransdale cousins, was guilty of the rudeness of staring. He could not
believe that he had heard correctly, as he contemplated the lithe figure, the
lounging attitude, the lumpy hair, the cigarette.

"Not—one of the Vicarage cousins?" he asked, in amazement.

Theo was delighted as she saw him visibly trying to adjust her with his
preconceived notion of the strictly brought up Miss Coopers.

"My father being a priest doesn't make me a priestess!" she cried. Her
voice was a little too loud at all times. "That's where the English make their
big mistake. My mother thinks she has every bit as much right to go round
lecturing the parishioners as my father has; but that's just tommy-rot, you
know. We're always telling her she hasn't any official status. You're not
married, are you, Mr. Mayne?"

"There isn't any room in the colonies for the English provincial vicarage
life," he replied good-humouredly, mentally contrasting this flower of
modern girlhood with his late ward, and trying to realise that this young
lady's parents had thought her contaminated by Melicent's companionship.

"Are you living in town?" he asked.

"Yes; I'm on the boards," said Theo, leaning forward to toss her
cigarette stump into the fire. "Keen on the theatre?" she asked casually.

Carol looked at Burmester, who was enjoying his friend's consternation.


The Cooper girls were the young man's horror and annoyance.

At this moment the door was pushed open, and Melicent came quietly
in.

She had been told who was there, and was on guard.

She knew why Mayne had come. He wanted to know how his
conspiracy was progressing. Very well; he would get nothing out of her.

Lance hurried to her. "So you've been to look at old Brooke's ancestral
acres?"
"Yes." She sat down after greeting the company. Her tone was
colourless.

"Dear," said Brenda, "I hope you've had some food; I told them to keep
it hot."

"Oh, yes, thanks. How's Pater getting on?"

"He's very anxious to hear what you've done."

"Oh, I don't know that I've done very much."

"You look tired."

"I am. Such a horrid journey. I wish Pater could have come."

"Why, was Captain Brooke not cordial?" asked Brenda, in surprise.

"Oh, quite, thanks. Only I don't know that I shall undertake the
commission after all; it's such a big thing."

"Millie!" Brenda almost gasped, for this speech was wholly out of
character with the habitual utterances of Miss Lutwyche, among whose
failings diffidence could not be reckoned.

"Well, you'll never get on," said Theo earnestly. "Hitch your waggon to
a star, my dear. You might live to be fifty, and never get such another
chance."

"That's very true," said Melicent, with curious emphasis.

Then she remembered Mayne's presence, and could have bitten out her
tongue.

"What do you think of Brooke, eh, Miss Lutwyche?" asked Lance, eager
to have his friend approved.

"Well, I thought him rather—what shall I say—capricious, unstable,"


she said, and was met with a simultaneous protest from both men.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like