diff --git a/pom.xml b/pom.xml
index 6a4b8397707e7ffd7eb3a9266bc9281f6875087c..12a69f2ac8e6f2d0c7cb55d67e01b00416b36a15 100644
--- a/pom.xml
+++ b/pom.xml
@@ -195,6 +195,12 @@
                 <groupId>org.jacoco</groupId>
                 <artifactId>jacoco-maven-plugin</artifactId>
                 <version>${jacoco.version}</version>
+                <configuration>
+                    <excludes>
+                        <!-- Generated code -->
+                        <exclude>**/org/springframework/samples/petclinic/dto/**</exclude>
+                    </excludes>
+                </configuration>
                 <executions>
                     <execution>
                         <goals>