Learning Spring Boot 2.0 - Second Edition: Simplify the development of lightning fast applications based on microservices and reactive programming Greg L. Turnquist - Quickly download the ebook in PDF format for unlimited reading
Learning Spring Boot 2.0 - Second Edition: Simplify the development of lightning fast applications based on microservices and reactive programming Greg L. Turnquist - Quickly download the ebook in PDF format for unlimited reading
com
OR CLICK HERE
DOWLOAD EBOOK
https://textbookfull.com/product/learn-microservices-with-spring-boot-
second-edition-moises-macero-garcia-macero-garcia-moises/
textbookfull.com
https://textbookfull.com/product/pro-spring-security-securing-spring-
framework-5-and-boot-2-based-java-applications-2nd-edition-carlo-
scarioni/
textbookfull.com
Greg L. Turnquist
BIRMINGHAM - MUMBAI
Learning Spring Boot 2.0
Second Edition
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted
in any form or by any means, without the prior written permission of the publisher, except in the case of
brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information
presented. However, the information contained in this book is sold without warranty, either express or
implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for
any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and
products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot
guarantee the accuracy of this information.
ISBN 978-1-78646-378-4
www.packtpub.com
Credits
As a test-bitten script junky, Java geek, and JavaScript Padawan, he is a member of the Spring Data
team and the lead for Spring Session MongoDB. He has made key contributions to Spring Boot, Spring
HATEOAS, and Spring Data REST while also serving as editor-at-large for Spring's Getting Started
Guides.
Greg wrote technical best sellers Python Testing Cookbook and Learning Spring Boot, First Edition, for
Packt. When he isn't slinging code, Greg enters the world of magic and cross swords, having written the
speculative fiction action and adventure novel, Darklight.
He completed his master's degree in computer engineering at Auburn University and lives in the United
States with his family.
About the Reviewer
Zoltan Altfatter (@altfatterz) is a software engineer, passionate about the JVM and Spring ecosystem.
He has several years of industry experience working at small startups and big consultancy firms.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files
available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are
entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free
newsletters and receive exclusive discounts and offers on Packt books and eBooks.
www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and
video courses, as well as industry-leading tools to help you plan your personal development and
advance your career.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help
us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1786
463784.
If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We
award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help
us be relentless in improving our products!
Table of Contents
Preface
What this book covers
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Quick Start with Java
Getting started
Spring Boot starters
Metrics
Summary
Summary
3. Reactive Data Access with Spring Boot
Getting underway with a reactive data store
Solving a problem
Wiring up Spring Data repositories with Spring Boot
Creating a reactive repository
Test dependencies
Unit testing
Slice-based testing
Testing with embedded MongoDB
Summary
Producing comments
AMQP fundamentals
Adding customized metrics to track message flow
Peeking at Spring Cloud Stream (with RabbitMQ)
Introduction to Spring Cloud
Monitoring circuits
Offloading microservice settings to a configuration server
Summary
8. WebSockets with Spring Boot
Publishing saved comments to a chat service
Creating a chat service to handle WebSocket traffic
Brokering WebSocket messages
Securing WebSockets
Tracing calls
Summary
10. Taking Your App to Production with Spring Boot
Profile-based sets of beans
When Learning Spring Boot, First Edition, by Packt, made its debut, it was the first Spring Boot book
to hit the international market. The user community ate it up, which is evidence of the popularity of
Spring Boot. And today, Spring Boot is driven by the same, core principal stated in that book's preface,
"How can we make Spring more accessible to new developers?"
By focusing on developers, community, and customers, Spring Boot has alleviated untold hours of time
normally spent plumbing infrastructure. Andrew Clay Shafer, Pivotal's Senior Directory of Technology,
has presented a most famous conference slide, "'Great job configuring servers this year'––No CEO
Ever." We don't get bonus points for wasting time configuring web containers, database connectors,
template view resolvers, and other mind-numbing infrastructure. However, we've done it for so long, we
all assume it's a part and parcel of our trade.
Spring Boot has upset that apple cart and shown that we can, in fact, focus on building features our
customers want on day one. As James Watters, Senior Vice President at Pivotal, has stated in countless
presentations, when you focus on things above the value line, you build real confidence with your
customers. This is demonstrated by the latest Zero Turnaround whitepaper showing that 46%, or almost
one of every two Java developers, is using some part of the Spring portfolio. Spring Boot is solving
problems for legions of customers, and this book can help you close the gap in your understanding.
What this book covers
, Quick Start with Java, explains how to rapidly craft a web application running on an
Chapter 1
embedded web container, access some data, and then deploy it into the cloud using minimal amounts of
code and build settings.
, Reactive Web with Spring Boot, shows how to start building a social media service to upload
Chapter 2
pictures using Spring WebFlux, Project Reactor, and the Thymeleaf template engine.
Chapter 3, Reactive Data Access with Spring Boot, explains how we can pick up Spring Data MongoDB
as a reactive-power data store and hook it to our social media platform. You'll find out how Spring Boot
autoconfigures our app to persist data.
, Testing with Spring Boot, explains how we can write unit tests with JUnit, slice tests where
Chapter 4
small parts of our app uses real components, and full-blown embedded container testing. Also, you will
see how to write an autoconfiguration policy for a browser-driving test toolkit and test that as well.
, Developer Tools for Spring Boot Apps, puts several tools in our hands to enhance developer
Chapter 5
experience, such as DevTools, LiveReload, and connecting our IDE to the cloud.
, AMQP Messaging with Spring Boot, explains how to use RabbitMQ as our message broker
Chapter 6
, Microservices with Spring Boot, introduces Spring Cloud and the ability to break up our social
Chapter 7
media platform into smaller, more manageable apps, dynamically talking to each other.
Chapter 8 , WebSockets with Spring Boot, shows how to enhance the user experience by sending updates
to all interested parties from various microservices. You will also see how to route all WebSocket
messages through a RabbitMQ broker.
, Securing Your App with Spring Boot, lets us secure the social media platform for production
Chapter 9
with both URL-based and method-based tactics, so only registered users can get online, and only
authorized admins and owners can actually delete uploaded pictures.
, Taking Your App to Production with Spring Boot, shows us how to bundle up our application
Chapter 10
and deploy to production without breaking the bank by using profile-based configurations to distinguish
between local and cloud-based situations and creating custom properties to tailor application settings
without rewriting code for every environment.
What you need for this book
Spring Boot 2.0 requires Java Developer Kit (JDK) 8 or higher
A modern IDE (IntelliJ IDEA or Spring Tool Suite) is recommended
RabbitMQ 3.6 or higher must be installed (check out https://www.rabbitmq.com/download.html, or, when
using Mac Homebrew, brew install RabbitMQ)
MongoDB 3.0 or higher must be installed (check out https://www.mongodb.com/download-center, or, when
using Mac Homebrew, brew install MongoDB)
Who this book is for
This book is designed for both novices and experienced Spring developers. It will teach you how to
override Spring Boot's opinions and frees you from the need to define complicated configurations.
Conventions
In this book, you will find a number of text styles that distinguish between different kinds of
information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy
URLs, user input, and Twitter handles are shown as follows:
"The @Data annotation from Lombok generates getters, setters, a toString() method, an equals() method, a
hashCode() method, and a constructor for all required (that is, final) fields."
New terms and important words are shown in bold. Words that you see on the screen, for example, in
menus or dialog boxes, appear in the text like this: "When the first user clicks on Submit, the message
automatically appears on the second user's window."
To send us general feedback, simply email [email protected], and mention the book's title in the
subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a
book, see our author guide at www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the
most from your purchase.
Downloading the example code
You can download the example code files for this book from your account at http://www.packtpub.com. If
you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the
files emailed directly to you.
1. Log in or register to our website using your email address and password.
2. Hover the mouse pointer on the SUPPORT tab at the top.
3. Click on Code Downloads & Errata.
4. Enter the name of the book in the Search box.
5. Select the book for which you're looking to download the code files.
6. Choose from the drop-down menu where you purchased this book from.
7. Click on Code Download.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest
version of:
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Learning-Spring-
Boot-2.0-Second-Edition. We also have other code bundles from our rich catalog of books and videos
details of your errata. Once your errata are verified, your submission will be accepted and the errata will
be uploaded to our website or added to any list of existing errata under the Errata section of that title.
We appreciate your help in protecting our authors and our ability to bring you valuable content.
Questions
If you have a problem with any aspect of this book, you can contact us at [email protected], and we
will do our best to address the problem.
Exploring the Variety of Random
Documents with Different Content
11 West Lincoln Street,
San Francisco.
Sir,
As a lover of the sea and all that therein is, I take this opportunity to beg
leave to apply for a post in your expidition, can turn my hand to anything
that isn’t crooked. Was gold-mining at Klondike two years but give it up
owing to a frost bight but am used to dealing with rough characters.
Seeing the piece about you in the evening paper to-night I make haist to
apply and you will find me equal prompt in my dealings I have to do with
you, and satisfactory. A line to above will oblige.
Yours, truly,
J. B. Yonkers.
P. S. Terms can be arranged.
CANDON
G EORGE did.
An abject and crawling apology from the Piker, published and
paid for in next morning’s papers, restarted the publicity campaign,
and, though the press never recovered its first careless rapture, the
thing had made good and was established in the mind of the public.
The letters came in day by day, some addressed to the club, some
care of Joe Barrett, all of the same tenor. The expedition that had
aroused mild merriment in the upper circles of San Francisco was
received in dead seriousness by the middle and lower circles—even
with enthusiasm. The thing had vast appeal to the movie-red mind;
the exploits of the Dutchman, inconsiderable enough in a world
where criminal license had suddenly added cubits to its stature, had
been boomed by the press. Hank Fisher had already a name to
embroider on and “Bud” du Cane was not unknown. Letters came
from all round the Bay; from Oakland, Berkeley, Port Costa, New
York, California, Antioch, Benicia, San Rafael and Tiburon; letters
came from Monterey and all down the coast. Letters from “all sorts
and sexes” to put it in Hank’s words. Women offered to come along
as cooks, boys as “deck-hands,” a retired banker at San Jo offered to
pay to be taken along. Never in any letter except that of the “bill-
mackerel” was there a reference to terms, all these people were
ready to go for nothing but their “grub and bunk” as one gentleman
put it, and, if you wish to gauge the utility of a personality like
Hank’s, this vast and healthy wave of adventure-craving which he
had set going amongst the populace of the state is an index.
“And not one of the lot is any use,” said Hank, as he sat in the
cabin with George one day about a week before the projected start.
“I saw those people I wrote to yesterday, one had consumption,
another one had swelled head, fancied himself a duke to judge by
his talk, another was six foot seven or thereabouts, couldn’t have
taken him aboard without his head sticking out of the saloon hatch,
another guy was on a tramp from Oskosh to S’uthern California and
wanted to take the expedition en route, he was an oil prospector
and troubled with something that made him want to scratch; then
there was an Italian who’d been a count and an Irishman who’d
served in the Irish rebellion under Roger Casement, a decent chap,
but I’d just as soon take aboard a live bomb shell. We’ll just have to
make out, you and me, as after-guard—four Chinks will be enough
for a crew and I can pick them up by the handful.”
“When are the provisions and stuff coming on board?”
“Tomorrow or next day. I saw J. B. yesterday—”
“Wear Jack, ahoy!” came a voice from the wharf through the open
skylight.
“Hullo!” cried Hank. “Who’s that and what d’you want?”
A thud came on the deck followed by the voice at the companion
hatch. “May I come below?” The stairs creaked and at the saloon
door appeared a man.
The sun glow from the skylight struck him full as he stood there, a
huge, red-bearded, blue-eyed sailor man, neatly dressed in dark
serge and wearing a red necktie. His eyes were most taking and
astonishing liquid sparkling blue—the eyes of a child.
Contrasted with the hatchet-faced Hank and the sophisticated
Bud, he seemed youthful, yet he was older than either of them.
CHAPTER X
NIGHT
T HE week before the sailing of the Wear Jack was a busy time for
the Fisher Syndicate and business was not expedited owing to
the fact that Candon had to be kept hidden. The red-bearded one
seemed happy enough, spending most of his time in the engine
room smoking cigarettes. At nights, safe with Hank in the “saloon,”
his mind disclosed itself in his conversation.
No, this was no wasp let in on them by Barrett or the Club boys.
The mind of Candon, as revealed to Hank, was as free from
crookedness as the eyes through which it looked, and on most topics
from the League of Nations to Ella Wheeler Wilcox, it was sound.
And it was not unlike the mind of Hank. It was self-educated and
their enthusiasms, from the idea of Universal Brotherhood to the
idea of the sanctity of womanhood, matched, mostly.
Candon, from what one could gather, had been a rolling stone, like
Hank, but he gave little away about himself and he was quite frank
about it.
“I’d just as soon forget myself,” said he. “I’ve been in a good many
mix-ups and I’ve missed a fortune twice through my own fault, but
I’ve come through with all my teeth and no stomach worries and
we’ll leave it at that.”
Barrett’s stores came on board and were stowed, and Hank,
through a boarding-house keeper, got his crew, four Chinamen all of
the same tong, all Lees, and bossed by a gentleman rejoicing in the
name of Lee Wong Juu. Champagne Charley, Hank labeled him.
They came tripping on board with their chests the night before
starting, vanished like shades down the foc’sle hatch and were seen
no more.
Hank, standing on the deck with George, heaved a sigh of
contentment. “Well, that’s done,” said he. “There’s nothing more to
take on board and we’re all ready for the pull out in the morning.”
“What time do you propose to start?” asked the other.
“Sunup. Barrett has got it into his head, somehow, we’re going at
noon. I didn’t tell you, but I got wind he’d arranged for a tug with a
brass band to lead us out and josh us. Can you see his face when he
finds us gone?”
They went below where the cabin lamp was lit, with Candon
reading a newspaper under it.
“The Chinks are come,” said Hank, taking his seat at the table,
and fetching out his pipe. “There’s nothing more to come in but the
mud-hook. Well, how do you feel, now we’re starting?”
“Bully,” said Candon. “I was beginning to feel like a caged canary.
You chaps don’t know what it’s been the last week. Well, let’s get
finished. There’s some truck still to be stowed in the after cabin and
I want to do a bit more tinkering at the engine. There’s a day’s work
on that engine—them cylinder rings were sure made in Hades.”
“Well, you can leave it,” said Hank. “I’m putting out at sunup. I
don’t count on that engine and you’ll have time to tinker with her on
the way down.” He stopped suddenly, raised his head, and held up a
finger. The night was warm and the skylight full open. In the dead
silence that fell on the cabin they could hear through the open
skylight the far-away rattle of a cargo winch working under the
electrics, the whistle of a ferry boat and away, far away, though
great as the voice of Behemoth, the boo of a deep sea steamer’s
siren.
“Yes,” began Hank again, gliding to the door of the saloon as he
spoke, “you can tinker with it on the way down.” He vanished, and
the others, taking his cue, kept up the talk. Then they heard him
pounce.
“What you doing here?”
“Hullo! me—I ain’t doin’ nothin’—what you gettin’ at? You lea’ me
go.”
“What you doing here, you low down scow-hunker? Answer up
before I scrag you.”
“Tell you I was doin’ nothin’. I dropped aboard to see if I couldn’t
borry a light, seein’ the shine of your skylight.”
“I’ll give you a light.”
Then they heard the quite distinctive sounds of a man being
kicked off the ship, blasphemous threats from the wharf-side—
silence.
A minute later Hank appeared, his lean face lit with the light of
battle.
“Popped my head on deck,” cried Hank, “and saw a fellow on the
wharf-side—I’ll swear it was Jake. He lit, and then I saw another one
hunched down by the skylight. You heard me kicking him off.”
“Who’s Jake?” asked Candon, who had taken his seat again at the
table.
“Watchman I fired for handing me lies more’n a fortnight ago.”
“Well,” said Candon, “the other man was Mullins, if I have my ears
on my head.”
“Who’s Mullins?”
“Black Mullins, McGinnis’ left hand. Boys, we’ve gotta get out.
How’s the wind?”
“Nor’west,” said Hank.
“And there’s a moon. Boys, we’ve gotta get right out now, get the
whaleboat over and the Chinks ready for a tow clear of the wharf.
Let’s see, the whole of the Heart crowd will be over at Tiburon, the
old Heart will be in dry dock, for she’d started a butt and there’s
weeks’ work on her, so they won’t be able to use her to chase us for
another fortnight, get me? Well, see now, that guy will be back in
Tiburon somewhere about two hours or more and he’ll rouse the
hive. He’ll have seen me, lookin’ down through the skylight, and he’ll
know you’re starting to-morrow. Not having a ship to chase us,
they’ll board us. You’ll have a boatload of gunmen alongside
somewhere about two in the morning.”
“You mean to say they’ll board us?” cried George.
“Yep.”
“But what about the police?”
“Police! Nothing. Why they’d beat it in a quick launch before the
cops had begun to remember they weren’t awake.”
“Well, let’s notify the police and have an ambush ready for them.”
“Not me,” said Candon. “I don’t want to have any dealings with
the law. Why if McGinnis and his crowd were taken, they’d swear
Lord knows what about me. Besides I’m not friends with the bulls.
I’m no crook, I’ve never looked inside a jail, but I’ve seen enough
good men done in by the law to make me shy of it.”
“But see here,” said Hank. “I can’t take her out at night. I don’t
know the lights, I’d pile her up sure.”
“I’ll take her out,” said Candon, “I’d take her out with my eyes
shut. It’s near full moon and we’ll have the ebb, what more do you
want?”
Hank turned to George.
“Let’s get out,” said George. “We don’t want a mix-up with those
people; if we get piled, why we have the boat.”
Hank turned to Candon.
“You’re sure you can do it?”
“Sure.”
“Then come on,” said Hank. He led the way on deck.
The wharf was deserted. To the left of them lay the bay, silver
under the moonlight and spangled here and there with the lights of
shipping at anchor. Whilst Hank trimmed the side lights and Candon
attended to the binnacle light, George went forward to rout out the
Chinks. He found them finishing their supper. Lee Wong Juu was
their cook as well as boss, he had lit the galley stove on his own
initiative and made tea. They had brought provisions enough for
supper. Their chests were arranged in order, everything was in
apple-pie trim and as they sat on their bunk sides with their tin
mugs in their hands and their glabrous faces slewed round on the
intruder, they looked not unlike a company of old maids at a tea
party.
George gave his order and they rose, put away their mugs and
followed him on deck.
The whaleboat had cost Hank ninety-five dollars, second-hand. It
was not a real whaleboat, either in size, make or fittings, but good
enough for their purpose, carvel built, four-oared, with tins fixed
beneath the thwarts to help float her in case of a capsize.
Candon was standing by the boat as George came on deck.
In the rapid moments that had come on them since the spy had
been kicked off the ship, Candon had gradually gained supremacy,
without effort, one might say. The man had arisen and was rising to
the emergency like a swimmer on a wave, bearing the others with
him. He was giving orders now quietly and without fuss.
They got the boat afloat with the four Chinks in her, and, the tow
rope having been fixed, Candon got into her, having cast off the
mooring ropes. Hank took the wheel of the schooner. George,
standing silent beside Hank, heard the creak and splash of the oars.
Then came the chug and groan of the tow-rope tightening, then
slowly, almost imperceptibly the bowsprit of the Wear Jack began to
veer away from the wharf. And now to port and starboard lay the
glittering harbour water and astern the long line of the wharves
began to show with the electrics blazing here and there where they
were working cargo overtime. As the wharves receded, they stole
into a world of new sounds and lights. San Francisco began to show
her jewelry, glittering ribbons of electrics, crusts of gems; on the
port bow the lights of Oakland, far across the water, answered to the
lights of San Francisco, and across the scattered silver ferry boats
showed like running jewels. The wind from the north west came
steady and filled with the breath of the unseen sea.
“Lord!” said Hank, “how much further is he taking us? Seems like
as if he were making for Oakland.”
“He knows what he is doing,” said George.
“Sure.”
They held on.
A Chinese junk passed, with her lateen sail bellying to the wind,
and then came along a yacht, lighted and riotous as a casino, with a
jazz band playing “Suwanee.” It passed and the great quietude of
the night resumed. Still the tow kept on.
Then came a voice from alongside. Candon had cast off the rope
and was coming on board.
To George, just in that moment, the whole scene and
circumstance came as an impression never to be forgotten; the
silence following the casting off of the rope, the vast harbour
surface, glittering like a ball-room floor, where the helpless Wear
Jack lay adrift, the lights of ’Frisco and the lights of Oakland and the
secrecy and necessity for despatch lest, drifting as they were, they
should be side-swiped by some Bay boat in a hurry. But he had little
time for thought. Candon was on board, the boat was got in and the
slack of the tow-rope, and Candon at the wheel began to give his
orders with speed but without hurry.
The mainsail rose slatting against the stars, then the foresail; a
Chink cast the gaskets off the jib, whilst the Wear Jack, trembling
like an undecided and frightened thing, seemed to calm down and
take heart. The slatting of the canvas ceased. They were under way.
Candon seemed steering for Oakland, then the Oakland lights
swung to starboard and passed nearly astern. They were making for
Alcatraz. The lights of San Francisco were now to port and the city
showed immense, heaving itself against the moonlight; Nobs Hill,
Telegraph Hill, Russian Hill, all ablaze beneath the moon, slashed
with lines of light. Away beyond Angel Island showed the lights of
Tiburon.
Right under Alcatraz, Candon put the helm hard over; the canvas
thrashed and filled again and the Wear Jack settled down on her
new tack, heading for the Presidio. Close in, the helm went over
again, the canvas fought the wind and then filled on the tack for
Lime Point, the northern gate post of the Golden Gate.
The breath of the sea now came strong, spray came inboard from
the meeting of wind and ebb tide and the Wear Jack began to thrash
at the tumble coming in from the bar.
Under Lime Point she came about on the port tack, taking the
middle passage. Then beyond Pont Bonito came the tumble of the
bar. The wind was not more than a steady sailing breeze but the
long rollers coming in from Japan gave them all the trouble they
wanted, though the Wear Jack, proving her good qualities, shipped
scarcely a bucket full. Then the sea smoothed down to a glassy
breeze-spangled swell and the schooner, with the loom of the land
far on her port quarter, spread her wings beneath the moon for the
south.
CHAPTER XII
OUT
C ANDON handed the wheel over to Hank. “Well, we’re out,” said
he. “Keep her as she goes, the coast’s a straight line down to
Point San Pedro, and I don’t want to clear it by more than ten miles.”
He lit a pipe and walked to the port rail, where he stood with the
pipe in his mouth and his hands on the rail looking at the land.
George stood beside him. The crew had vanished to the foc’sle,
now that everything was comfortable, leaving the deck to the three
white men; no watches had been picked nor was there a look-out.
George remarked on the fact and Candon laughed.
“I’d just as soon leave the Chinks below,” said he, “and run her
ourselves for the rest of the watch. Half a man could handle her as
the wind is, and as for a look-out, why I reckon nothing could sink
us to-night. Boys, I’m sure bughouse, I never took a ship out of
’Frisco bay before two hours ago.”
“You what!” said George.
“What I’m telling you. It came on me to do it and I did it. I’ve
been in and out often enough, but never at the wheel nor
navigating. I had the lay of the place in my head but it was a near
touch.”
Hank at the wheel gave a laugh that sounded like a cough.
“I felt it in my bones,” said Hank.
“What?” asked Candon.
“Why that you were driving out half blind; as near as paint you
had us on to Alcatraz and you all but rammed the Presidio. I was
standing on my toes wanting to yell ‘Put your helm over,’ but I kept
my head shut, didn’t want to rattle you.”
“Bughouse, clean bughouse,” said Candon. “Makes me sweat in
the palms of my hands now I’ve done it, but I tell you boys, I
couldn’t have missed. Going by night like that one can’t judge
distance and as for the lights, they’d better have been away, but I
couldn’t have missed, I was so certain sure of myself. It comes on
me like that at times, I get lifted above myself, somehow or
another.”
“I’m the same way myself,” said Hank, “it comes on me as if I got
light-headed and I’m never far wrong if I let myself go. Bud here will
tell you I rushed this expedition through more by instinct than
anything else—didn’t I, Bud?”
Bud assented, unenthusiastically.
George Harley du Cane, out and away now with the Pacific
beneath him and his eyes fixed on the far-off loom of the land, was
thinking. He had recognized, even before starting, that Hank and
Candon were, temperamentally, pretty much birds of the same
feather. Not only had their discussions as to socialism and so forth
seemed to him pretty equally crazy, but he had recognized, in a dim
sort of manner, that they infected one another and that their
“bughouse” qualities were not diminished by juxtaposition. However,
safe in port, the sanity or insanity of his companions, expressed only
in conversation about abstract and uninteresting affairs, did not
seem to matter. Out here it was different, somehow, especially after
the exhibition Candon had just given them of daring carried to the
limits of craziness. And who was Candon, anyhow? A likable man,
sure enough, but the confessed associate of more than shady
characters, and they had accepted this man on his face value, as a
pilot in an adventure that was sure to be dangerous, considering the
character of the man they were out to hunt.
Well, there was not a bit of use bothering. He had gone into the
business with his eyes open. There he was, wealthy, at ease with all
the world, talking to those men in the club, when in came Hank with
his lunacy, saying he was going to catch Vanderdecken. He had
followed the Rat Trap Inventor out, taken his arm and insisted on
becoming part and parcel of his plans. Why? He could not tell why.
And now he was tied up in a venture with Chinks and two cranks; a
venture which, if it failed, would make him ridiculous, if it succeeded
might make him a corpse. He might now have been respectably
shooting in the Rockies only for his own stupidity.
Then, all of a sudden, came a question to his mind, “Would you
sooner be respectably shooting in the Rockies or here?” Followed by
the surprising and immediate answer, “Here.” Bughouse—clean
bughouse—but the fact remained.
It was now getting on for two in the morning, and he went below,
leaving the deck to the others. They intended carrying on till four,
and then rousing the crew up for the morning watch.
They told him they would call him when they wanted him and he
turned in, dropping to sleep the instant his head touched the pillow.
When he awoke it was daylight, water dazzles were at play on the
Venesta panellings, as the early sunlight through the portholes
shifted to the lift of the swell, snores from the two other occupied
bunks seemed to keep time to the movement of the Wear Jack and
from the topmost starboard bunk, Hank’s pyjama-clad leg hung like
the leg of a dead man.
The whole of the after-guard had turned in, leaving apparently the
schooner to run herself. He turned out and without stopping to wake
the others came hurriedly up the companion way on deck.
CHAPTER XIII
T HE sun was up and away to port lay California, lifting her hills to
heaven against the morning splendour, to starboard, a mile or so
away, a big freighter, in ballast and showing the kick of her propeller,
was pounding along north with the sunlight on her bridge canvas.
Even at that distance George could hear the thud of her screw like
the beating of a heart.
A Chinaman was at the helm of the Wear Jack, Champagne
Charley no less, and forward another celestial was emptying a slush
tub over the port rail.
George nodded to the helmsman, and then, taking his seat on the
skylight edge, contemplated the coast.
George’s yachting experience had been mainly confined to the
Bay. He could steer a boat under sail, but of deep sea work and
cruising in big yachts he knew practically nothing. Still, even to his
uninitiated mind, this thing seemed wrong. Candon and Hank had
evidently left the deck at the beginning of the morning watch, that is
to say four o’clock, leaving the Chinks to run the show. They had
been running it for three hours or so and doing it satisfactorily, to all
appearances. Still it didn’t seem right.
He determined to go for the other two and give them a piece of
his mind and then, when, a few minutes later, they came on deck
yawning and arrayed in their pyjamas, he didn’t. They seemed so
perfectly satisfied with themselves and things in general that it was
beyond him to start complaining. Instead he went down and tubbed
in the bathroom. An hour later, as he was seated at breakfast with
the two others, his whole attitude of mind towards “Chinks” had
changed, for the schooner was running on her course with scarcely a
tremor of the tell-tale compass, the breakfast was set as if by a
parlour-maid, and the ham and eggs were done to perfection. More
than that, they were waited upon by a waiter who knew his
business, for when he had done handing things round, he vanished
without a word and left them to talk.
“Oh, that’s nothing,” said Candon, in reply to a remark of George’s.
“Those Chinks could run this packet by themselves. When a
Chinaman signs on as an A. B., he is one. He doesn’t pretend to be
what he isn’t, not on a ship running out of ’Frisco anyhow, and he’s
more, every Chinaman’s a cook and a laundress and it’s ten to one
he’s a tailor as well. I tell you, when I think of what one Chink can
do and what one white man generally can’t, I get frightened for the
whites.” Hank was cutting in, and an argument on the colour
question between these two was prevented only by George
remembering something of more immediate moment.
“Look here,” said he to Candon, “can’t you tell us more about
Vanderdecken now we’re out. What I mean to say is the plans you
have about him. Where are we going, anyway?”
“South,” said Candon.
“I know that,” said George, “but where south? South’s a big
place.”
“It is,” said the other; “too big for guessing, but now we’re out
and I’m going to put you wise. First of all, I promised you to put this
guy’s boodle into your hands, and second I promised you the guy
himself. I hung off from telling you the location till you’d done your
part of the contract and got me out away from the McGinnis crowd.
Well, you’ve done your part and here’s mine. The place I’m taking
you is known by the Mexicans as the Bay of Whales.”
“The Mexicans!” said George.
“Yep. We’ve got to turn the corner of Lower California, that’s to
say Cape St. Lucas, then out across the Bay of California for the
Mexican coast and the Bay of Whales. It’s away above Jalisco. It’s
worth seeing. I don’t know how it is, maybe it’s the currents or the
winds or just a liking for a quiet burying ground, but every old
sulphur bottom that’s died between here and Timbuctoo seems to
have laid his bones there. There’s a Mexican superstition about the
place, maybe on account of the bones, but no one ever goes there.
It’s the lonesomest place on God’s footstool, the shore-along ships
keep clear of it and it’s all reefs beyond the sand of the bay so you
don’t get ships putting in. I tell you, you could photograph the
lonesomeness. Well there the boodle is and there you’ll put your
hands on the guy you want.”
Said Hank: “Look here, B. C.”—Candon had come down to initials
after the manner of ’Frisco. “How did old man Vanderdecken make
out, anyway. What I’m getting at is this: I figured his fishing grounds
to be the Channel Islands and north and south of there, but that’s a
good long way from St. Lucas.”
“That’s so,” said Candon. “Well, I’ll tell you, right along till near the
end he used to keep the stuff he got aboard his own hooker. You’re
right, his lay was the Channel Islands. But finding he’d made the
place too hot for himself all right along down the American
seaboard, and expectin’ to be searched, he did a dive for the bay I
told you of and there he cached the stuff, and I’m the only man
beside himself that knows where the cache is.
“There, I’ve told you that much. I’m not going to say how I got so
thick with him as to know his plans and dispositions. I just ask you
to take B. C.’s word that the goods are according to the manifest.”
“Oh, that’s all right,” said Hank, “I don’t want to dig into your
business, all I want’s the Dutchman, and to put my hand on his
shoulder.”
“And so you shall,” said B. C., “’less he dies before we get there.”
They came up and, Candon taking the wheel, the two Chinamen
who were holding the deck dived below. An hour later, the Chinks
being called up, watches were picked, George falling to Hank,
Champagne Charley to Candon.
Candon being the most knowledgeable man and the best sailor, it
was agreed that he should work the ship.
“You can’t have two heads,” said Hank, “and I reckon yours is
better than mine where navigating her is concerned.”
CHAPTER XIV
ST. NICOLAS
T HEY had fixed to row ashore after breakfast but fishing held
them till afternoon. Candon, not keen on the business of
climbing over rocks, remained behind to finish tinkering at the
engine which he had almost got into working order.
Usually there is a big swell running here, but to-day there was
only a gentle heave lifting the long green vine tendrils of the kelp. It
was like rowing over a forest. On the beach they left the boat to the
two Chinamen who had rowed them off and, Hank leading the way,
they started to the right towards the great sand spit that runs into
the sea for half a mile or more.
A Farallone cormorant, circling in the blue above, seemed to watch
them; it passed with a cry, leaving the sky empty and nothing to
hear but the wash of the sea on the beaches and far off an
occasional gull’s voice from the spit. Reaching a great forward
leaning rock, they took their seats in the shade of it to rest and light
their pipes. The sand lay before them, jutting into the kelp-oily sea
and beyond the kelp the blue of the kuro shiwo. The Wear Jack was
out of sight, the horizon seemed infinitely far and of a world where
men were not or from whence men had departed for ever.
“Say, Bud,” said Hank, leaning on his side with a contented sigh,
“ain’t this great!”
“Which?” asked Bud.
“The lonesomeness. Listen to the gulls, don’t they make you feel
just melancholy.”
“Do you like to feel melancholy?”
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.
textbookfull.com