Spring Quick Reference Guide: A Pocket Handbook for Spring Framework, Spring Boot, and More Adam L. Davis All Chapters Instant Download
Spring Quick Reference Guide: A Pocket Handbook for Spring Framework, Spring Boot, and More Adam L. Davis All Chapters Instant Download
com
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
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
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
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
https://textbookfull.com/product/biota-grow-2c-gather-2c-cook-loucas/
textboxfull.com
Adam L. Davis
Spring Quick Reference Guide: A Pocket Handbook for Spring
Framework, Spring Boot, and More
Adam L. Davis
Oviedo, FL, USA
Chapter 1: Introduction������������������������������������������������������������������������1
Who Should Read This Book���������������������������������������������������������������������������������2
About This Book����������������������������������������������������������������������������������������������������2
Chapter 2: Overview�����������������������������������������������������������������������������5
Core Spring�����������������������������������������������������������������������������������������������������������5
Spring Modules�����������������������������������������������������������������������������������������������������7
v
Table of Contents
Properties������������������������������������������������������������������������������������������������������������16
Environment��������������������������������������������������������������������������������������������������������17
Profiles����������������������������������������������������������������������������������������������������������������18
SpEL��������������������������������������������������������������������������������������������������������������������19
Testing����������������������������������������������������������������������������������������������������������������20
vi
Table of Contents
vii
Table of Contents
viii
Table of Contents
ix
Table of Contents
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
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
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.
2
Chapter 1 Introduction
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.
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.
7
Chapter 2 Overview
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.
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();
}
@Configuration(proxyBeanMethods = false)
10
Chapter 3 Dependency Injection
@Configuration
public class Configuration {
@Bean
public MyService myService() {
return new MyActualService();
}
@Bean
public OtherService service2(final MyService myService) {
return new MyActualOtherService(myService);
}
11
Chapter 3 Dependency Injection
@Bean
public OtherService service2(@Qualifier("myService")
MyService s) {
return new MyActualOtherService(s);
}
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
<context:component-scan base-package="com.example"/>
@Configuration
@ComponentScan("com.example")
public class Configuration {
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")
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).
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
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:
15
Chapter 3 Dependency Injection
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:
@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."
"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.
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."
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."
"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."
"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,
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?"
The reply struck her as remarkable, but she had no time to reflect upon
it, for Lance again struck in:
"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."
Everyone was now crowding with interest around the music-stool where
Melicent sat.
"What and where would your house be, Captain Brooke?" asked
Helston.
"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!"
"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.
"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."
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.
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?"
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:
"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."
"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."
"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."
"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."
"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.
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.
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.
"Please don't apologise," she said. "I am used to roughing it, and I like
it."
"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.
"Oh," she said, "scenery is my particular fad. But this is too tame for
me. You should see my Cleveshire moors and dales!"
"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."
"I've had enough wildness," he answered very determinedly. "I like this
because of its cultivation and fertility and order."
"What!" cried Millie, "when you've bought your land, and found your
ancestors and all! I never heard of such a thing."
"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.
"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—"
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.
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.
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.
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.
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.
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.
"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.
"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.
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.
"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.
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.
"But don't have them unless you like," she earnestly advised. "Some
people think them sad."
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.
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.
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.
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.
"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:
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?
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.
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.
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.
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.
"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.
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."
"I am. Such a horrid journey. I wish Pater could have come."
"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."
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.
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.
textbookfull.com