| |||||||||||||
ErrataChapter 1Section 1.5.2 on page 22.The archetype used to create the first application is not the one listed in the book. The name of the artifact is maven-archetype-webapp and has the coordinates:
Section 1.5.3 on page 24.The coordinates for the $ mvn archetype:generate -DgroupId=org.bytesizebook.com.guide.boot\ -DartificatId=basic-webapp\ -DpackageName=com.bytesizebook.com\ -DarchetypeArtifactId=maven-archetype-webapp The original command is missing properties for the archetype. The first three properties in the original command can have any values. Two additional properties for the archetype must be included. $ mvn archetype:generate -DgroupId=org.bytesizebook.com.guide.boot\ -DartificatId=basic-webapp\ -DpackageName=com.bytesizebook.com\ -DarchetypeArtifactId=maven-archetype-webapp\ -DarchetypeGroupId=org.bytesizebook.com.guide.boot\ -DarchetypeVersion=1.0 The archetype contains the starting code for the examples in the first three chapters of the book. Chapter 4Section 4.2.2 on page 133The command to declare a command line argument is incorrect. It is missing a hyphen.
The part of the command that starts with mvn spring-boot:run -Dspring-boot.run.arguments=--program=automobile Section 4.232 on page 134The command to declare a command line argument is incorrect. It is missing a hyphen.
The part of the command that starts with mvn spring-boot:run -Dspring-boot.run.arguments=--program=none Section 4.2 on page 129The starter code for this chapter has been moved to the central repository. The new coordinates are different that the ones listed in the book. Always take the latest version of the code. The current version is 1.0.1. The only difference from the book's coordinates is the version:
Use the coordinates of this archetype to generate the starting code, as in Chapter 1. This is one command that appears on one line. The \ character is used to escape the newline character so it can be displayed in the book. mvn archetype:generate \ -DgroupId=com.bytesizebook \ -DartifactId=spring-cli \ -DpackageName=com.bytesizebook \ -DarchetypeGroupId=com.bytesizebook \ -DarchetypeArtifactId=spring-boot-java-cli \ -DarchetypeVersion=1.0.1
The exact values for the archetype can be seen by searching for
If the archetype is not selected automatically and you are asked to enter a filter, enter
Section 4.2.2 on page 133
Once the archetype is generated, run it with the following command. Unfortunately,
the typesetter for the book changed mvn spring-boot:run -Dspring-boot.run.arguments=--program=automobile
These commands use a different value for the mvn spring-boot:run -Dspring-boot.run.arguments=--program=client mvn spring-boot:run -Dspring-boot.run.arguments=--program=none Chapter 5Section 5.4.2 on page 190
The uri for the taglib should use <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> Section 5.6.2 on page 201The @PostMapping("confirm")
The method is using both session and model attributes as an example to explain the implications
of using both of them. The technique used earlier in the chapter with only the
@PostMapping("confirm") public String confirmMethod( @ModelAttribute("data") Optional Section 5.6.3 on page 203
The name in the qualifier annotation should be Section 5.7.3 on page 212.Section 5.7.3 includes the FATAL level for loggers. Many logging packages have a FATAL level, but
Chapter 6Section 6.2.1 on page 241The confirm and process pages have slight modifications from the versions in Chapter 5. They both have to include the new field for the days per week. Confirm ViewAfter displaying the information for the hobby and aversion, display the information for the days per week. <br> The value of the days per week that was sent to this page is: <strong>${data.daysPerWeek}</strong> Process ViewInclude the information for the days per week along with the information for the hobby and aversion. <p> Thank you for your information. Your hobby of <strong>${data.hobby}</strong>, aversion of <strong>${data.aversion}</strong> and days per week of <strong>${data.daysPerWeek}</strong> will be added to our records, eventually. Section 6.3.2 on page 248The interface named Section 6.3.2 on page 250
Section 6.3.2 on page 252
The error message for a small number in the Section 6.3.2 on page 253In addition to the modification to the confirm method, the controller must:
In the bean for the application, change all occurrences of the Section 6.4.2 page 259
The @Transient public boolean isValidHobby() { return hobby != null && !hobby.trim().equals("") && !hobby.trim.toLowerCase().equals("time travel"); } Section 6.4.3 page 275
The HREF for the View All Records buttons should be Section 6.5 page 276The steps for the application also require creating an interface for the persistent bean. Extend the interface from the required validation interface and add a public property for the id. Do not add a setter for the id. Chapter 7Section 7.7.1 page 320Ignore the first paragraph in the section. The controller will still handle post requests as in the previous examples. |
|||||||||||||
Contact the author |