Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

URL Cleanup #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.writing.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Except where otherwise noted, this work is licensed under http://creativecommons.org/licenses/by-nd/3.0/
Except where otherwise noted, this work is licensed under https://creativecommons.org/licenses/by-nd/3.0/
10 changes: 5 additions & 5 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:spring_boot_version: 1.5.10.RELEASE
:EnableAutoConfiguration: http://docs.spring.io/spring-boot/docs/{spring_boot_version}/api/org/springframework/boot/autoconfigure/EnableAutoConfiguration.html
:SpringApplication: http://docs.spring.io/spring-boot/docs/{spring_boot_version}/api/org/springframework/boot/SpringApplication.html
:EnableAutoConfiguration: https://docs.spring.io/spring-boot/docs/{spring_boot_version}/api/org/springframework/boot/autoconfigure/EnableAutoConfiguration.html
:SpringApplication: https://docs.spring.io/spring-boot/docs/{spring_boot_version}/api/org/springframework/boot/SpringApplication.html
:toc:
:icons: font
:source-highlighter: prettify
Expand All @@ -21,7 +21,7 @@ Spring's Cache Abstraction, backed by Pivotal GemFire, will be used to cache the
The Quote service is located at...

....
http://gturnquist-quoters.cfapps.io
https://gturnquist-quoters.cfapps.io
....

The Quote service has the following API...
Expand Down Expand Up @@ -99,7 +99,7 @@ Your next step is to create a service class that queries for quotes.
include::complete/src/main/java/hello/QuoteService.java[]
----

The `QuoteService` uses _Spring's_ `RestTemplate` to query the Quote service's http://gturnquist-quoters.cfapps.io/api[API].
The `QuoteService` uses _Spring's_ `RestTemplate` to query the Quote service's https://gturnquist-quoters.cfapps.io/api[API].
The Quote service returns a JSON object, but _Spring_ uses Jackson to bind the data to a `QuoteResponse` and ultimately,
a `Quote` object.

Expand All @@ -117,7 +117,7 @@ and cached previously.

The `@CachePut` uses a SpEL expression ("`#result.id`") to access the result of the service method invocation
and retrieve the ID of the `Quote` to use as the cache key. You can learn more about _Spring's Cache Abstraction_
SpEL context http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#cache-spel-context[here].
SpEL context https://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#cache-spel-context[here].

NOTE: You must supply the name of the cache. We named it "Quotes" for demonstration purposes, but in production,
it is recommended to pick an appropriately descriptive name. This also means different methods can be associated
Expand Down
4 changes: 2 additions & 2 deletions complete/src/main/java/hello/QuoteService.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
@Service
public class QuoteService {

protected static final String ID_BASED_QUOTE_SERVICE_URL = "http://gturnquist-quoters.cfapps.io/api/{id}";
protected static final String RANDOM_QUOTE_SERVICE_URL = "http://gturnquist-quoters.cfapps.io/api/random";
protected static final String ID_BASED_QUOTE_SERVICE_URL = "https://gturnquist-quoters.cfapps.io/api/{id}";
protected static final String RANDOM_QUOTE_SERVICE_URL = "https://gturnquist-quoters.cfapps.io/api/random";

private volatile boolean cacheMiss = false;

Expand Down