Susan Harkins (406) [Avatar] Offline
Please post errors found in the published version of Spring in Action, Fifth Edition here. If necessary, we'll publish a comprehensive list for everyone's convenience. Thank you for participating in the collection process. Your contributions are a great help to us and other readers.

Susan Harkins
Errata Editor
httrart (7) [Avatar] Offline
I am really not sure this book is finished.

I've only just started.

But in Chapter 2, for example, in listing 2.2, he imports the Taco class.

But we haven't written that class yet and won't for a while. Yet he finishes this section and says to start the app, but the app will not start as this model is not yet written, which happens several pages later in listing 2.5 after he writes the post method.

In the post method in listing 2.4, he has the following line:

public String processDesign(Design design) {

(Page 40).

Except this won't work. As noted in a post on this forum from over a year ago, there is no Design to act on. There is a Taco, which comes after this.

Do I have the wrong version of the PDF or something? This does not appear to be close to ready for publication as everything has failed the first time we get to real code in Chapter 2, including a number of things complained about here in this forum a year ago.
Susan Harkins (406) [Avatar] Offline
Do you have a print book or an electronic mobile? The final mobiles haven't been released yet.

Susan Harkins
Errata Editor
httrart (7) [Avatar] Offline
I have the PDF which I was told by support is final.

The other mobile versions are not final. But when the message came out that the book was ready it was said the PDF was final and I wrote asking about that and was confirmed that it was. But if it is, and we're printing off it, we're in trouble.
Susan Harkins (406) [Avatar] Offline
I'll check with the author. In the meantime, how did you get confirmation that your pdf was the final? Did you talk with someone in Customer Service?

Susan H.
httrart (7) [Avatar] Offline
In the Oct. 5 mail Manning sent out, Manning included the note:

This PDF is the final version, identical to the softbound edition, which is currently being printed and is expected to be in stock on 2018-10-17.

We'll ship Spring in Action, Fifth Edition to you automatically—no action required from you. Below is the shipping address currently listed on your order (#2329083).

I downloaded the Kindle version and wrote a support question asking if that was up to date and received the following reply:

In regards to the kindle version, I believe the pdf is the final edit, but that they are still fine tuning the kindle version. The expected date for the final edit for kindle is 10/30.

Let me know if you have any other questions.
Manning Support

When I saw the errors that have been in every single version that have been reported by users for over a year, I checked again with support and got back the following:

Hello Art,

I have looked into the issue that you've described for me. I appreciate how much information and effort you put in. As far as I can tell, the pdf you have is the final version and that the issue still stands even after the final edit. I am not sure why the author and editor left the explanation the way it is other than the author must want you to complete that part of the program first before you go on to fix it later in the chapter. As most of the employees only have expertise in creating and editing the titles, we rely on the authors for the technical knowledge needed to properly explain the subject matter.

I see that someone has brought up the issue in the new forum for the title that is connected directly with the editor of the book. I would keep an eye on that discussion to see if they have any more information or help for you. I am sorry there is not much more I can do to help in this situation.

Thanks again for your effort to get these issues resolved. Let me know if there is anything else I can do for you.
Manning Support

My hope is this is not the final PDF. My concern is there have been seven versions of this MEAP all with the same errors and all AFTER it was cited on this forum to be an error to fix. If this book goes live in the condition it is in now you will have a huge issue with customers as this book, if my PDF is right, can not possibly be final given the errors that have not been resolved for over a year without someone simply trying to get paid for not finishing something. So, I REALLY hope it's just the wrong PDF as the alternative is someone is trying to do a bad thing.
589024 (13) [Avatar] Offline
In Chapter 2, why
@Valid @ModelAttribute("design") Taco design
but no
@Valid Order order
? Can you explain the difference? What caused the error if we remove
589024 (13) [Avatar] Offline
In Chapter 3, I only implemented JPA and used
for the Ingredient type column.
But after submitting the taco form, I find URLs have jsessionid appended.
How to hide these jsessionid? I didn't notice this when I first read the book. What caused it?
Michael Davoli (6) [Avatar] Offline
Just bought the book and downloaded the PDF today.

Page 23, Part 1 Foundational Spring, second paragraph: "In chapter 2, you’ll dig deeper into the Spring MCV..."

Should be MVC.
Michael Davoli (6) [Avatar] Offline
Page 26, 1.1 What is Spring?

"For example, suppose that among an application’s many components, there are two that you’ll address: an inventory service (for fetching inventory levels) and a prod- uct service (for providing basic product information). The product service depends on the inventory service to be able to provide a complete set of information about products."

I think it should read "The inventory service depends on the product service to be able to provide a complete set of information about products."
615895 (2) [Avatar] Offline
2.3.1. Declaring validation rules, p.47

For that, you’ll use Hibernate Validator’s @NotBlank annotation.

Which is @Depricated

But in Listing 2.11 author used javax.validation.constraints.NotBlank
Michael Davoli (6) [Avatar] Offline
Listing 2.2 The beginnings of a Spring controller class

There is absolutely no reference to the method call
filterByType(ingredients, type)

We can assume it is implicit that we implement this, but it would be better if you at least acknowledged that it needs to be implemented.
Michael Davoli (6) [Avatar] Offline
Page 38 (Page number 36)
In order to use Thymeleaf, you need to add another dependency to your project build. The following <dependency> entry uses Spring Boot’s Thymeleaf starter to make Thymeleaf available for rendering the view you’re about to create:

But we already added the Thymeleaf starter reference on page 13
Listing 1.1 The initial Maven build specification
Kapil Dev S (2) [Avatar] Offline
Page no: 55. Confusing statement
"Among the many helpful bits of development-time help offered by DevTools, it
will disable caching for all template libraries but will disable itself (and thus reenable
template caching) when your application is deployed"

Correction: "... it will not disable caching for all template libraries but will disable itself...

Page no: 57, Listing 3.1 SQL query missed where clause missed
statement = connection.prepareStatement(
"select id, name, type from Ingredient");

has to be like
statement = connection.prepareStatement(
"select id, name, type from Ingredient where id=?");

Page no: 62 Repeated reference to findOne() method as findById()
In listing 3.5 a method is named as
but when referencing it in text explanations it's named as

Page no: 68 Type mismatch
When we implement
method in JdbcTacoRepository we will get a type mismatch error saying cannot convert String to Ingredient.
Just change String to Ingredient in
private List<String> ingredients;

should be replaced to
private List<Ingredient> ingredients;

Page no: 69 Typo in referencing update() method
The following line,
The update() method, used when saving ingredient data, doesn’t help you get at the generated ID

should be
The update() method, used when saving Taco data, doesn’t help you get at the generated ID

Page no: 70, Listing 3.12 Not an errata, but just to indicate people who face compile error
In order for DesignTacoController to compile we have to update with the below lines (which is available in source code of the book)

private List<Taco> tacos = new ArrayList<>();
public void addDesign(Taco design) {

Page no: 75, Section 3.2 Persisting data with Spring Data JPA
- Once we change from JDBC to JPA, we have to delete, and
- Rename data.sql to import.sql (as we are using hibernate), otherwise data won't get updated in database
- Make the type property in Ingredient domain as enumerated string, so that you won't face Type conversion error while inserting import.sql data to database:
private final Type type;

Page no: 128, Section 5.2.2 Taco property popup warning
With that metadata in place, the warnings should be gone

For this to happen, we have to restart the IDE
Michael Davoli (6) [Avatar] Offline
Page 40
Listing 2.4 Handling POST requests with @PostMapping
public String processDesign(Design design) {
// Save the taco design...
// We'll do this in chapter 3"Processing design: " + design);
return "redirect:/orders/current";
When the form is submitted, the fields in the form are bound to properties of a Taco object (whose class is shown in the next listing) that’s passed as a parameter into processDesign().

Should be processDesign(Taco design)
Vulinh Nguyen (6) [Avatar] Offline
Chapter 1, p.5 (book):
There is invalid "/" in the end tag "/>", just right after the "com.example.ProductService" class name.
The following code snippet:

<bean id="productService"
class="com.example.ProductService" />

Should be replaced with:

<bean id="productService"

29477 (1) [Avatar] Offline
===> Page 51. The last paragraph has the sentence "The most significant thing to notice about @WebConfig is that it implements the WebMvcConfigurer interface." There is no annotation "@WebConfig" that it the name of the class. It should be corrected to "The most significant thing to notice about the class WebConfig .."
Misa (43) [Avatar] Offline
There is an error on the Errata page, in the entry for Page 33, listing 2.2:

The second line of the method filterByType() is shown as
<Ingredient> ingredients, Type type) {

That is incorrect, and the code will not compile. This is what that line should look like:
List<Ingredient> ingredients, Type type) {

The only change is to prefix that line with List
mwone (4) [Avatar] Offline
Page 62 - middle of page,

'then the following implementation of findAll() shows how to do that:

public Ingredient findOne(String id) {'

Shouldn't findAll() be findOne(...)?
Misa (43) [Avatar] Offline
Issues with use of the @NotBlank annotation:

[1] As previously reported by three other posters, in listing 2.9 on page 44 replace
import org.hibernate.validator.constraints.NotBlank;
import javax.validation.constraints.NotBlank;

[2] On page 47 replace
For that, you’ll use Hibernate Validator’s @NotBlank annotation.
For that, you’ll use the Java EE 8 Bean Validation annotation @NotBlank.

[3] In the code download, in directories ch03, ch04 and ch05, the file should import javax.validation.constraints.NotBlank instead of org.hibernate.validator.constraints.NotBlank .

To be clear, this is not a serious problem since the code still works. However, it's still really frustrating to see this issue being raised repeatedly by MEAP customers, yet the errors still needlessly made it into the published edition of the book.
612390 (1) [Avatar] Offline
"The keyword Between indicates that the value of deliveryZip must fall between the values passed..."

deliveryZip should be replaced with placedAt
Michael Davoli (6) [Avatar] Offline
Listing 3.10 Implementing TacoRepository with JdbcTemplate

Missing @Autowired for constructor.

public JdbcTacoRepository(JdbcTemplate jdbc) {
this.jdbc = jdbc;
553600 (1) [Avatar] Offline
on page 157 it should be:

public IngredientResourceAssembler() {
super(IngredientController.class, IngredientResource.class);

instead of

public IngredientResourceAssembler() {
super(IngredientController2.class, IngredientResource.class);