Skip to content

Commit 071d91f

Browse files
florianmaier101178dsyer
authored andcommitted
removed duplicate block, addresses issue spring-guides#53
1 parent 1dae7f2 commit 071d91f

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

README.adoc

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,7 @@ include::complete/src/main/java/com/example/accessingdatajpa/AccessingDataJpaApp
141141
----
142142
====
143143

144-
`Application` includes a `demo()` method that puts the `CustomerRepository` through a few tests. First, it fetches the `CustomerRepository` from the Spring application context. Then it saves a handful of `Customer` objects, demonstrating the `save()` method and setting up some data to work with. Next, it calls `findAll()` to fetch all `Customer` objects from the database. Then it calls `findOne()` to fetch a single `Customer` by its ID. Finally, it calls `findByLastName()` to find all customers whose last name is "Bauer". The `demo()` method returns a `CommandLineRunner` bean that automatically runs the code when the application launches.
145-
146-
The `AccessingDataJpaApplication` class includes a `main()` method that puts the
147-
`CustomerRepository` through a few tests. First, it fetches the `CustomerRepository` from
148-
the Spring application context. Then it saves a handful of `Customer` objects,
149-
demonstrating the `save()` method and setting up some data to use. Next, it calls
150-
`findAll()` to fetch all `Customer` objects from the database. Then it calls `findOne()`
151-
to fetch a single `Customer` by its ID. Finally, it calls `findByLastName()` to find all
152-
customers whose last name is "Bauer".
144+
The `AccessingDataJpaApplication` class includes a `demo()` method that puts the `CustomerRepository` through a few tests. First, it fetches the `CustomerRepository` from the Spring application context. Then it saves a handful of `Customer` objects, demonstrating the `save()` method and setting up some data to work with. Next, it calls `findAll()` to fetch all `Customer` objects from the database. Then it calls `findOne()` to fetch a single `Customer` by its ID. Finally, it calls `findByLastName()` to find all customers whose last name is "Bauer". The `demo()` method returns a `CommandLineRunner` bean that automatically runs the code when the application launches.
153145

154146
NOTE: By default, Spring Boot enables JPA repository support and looks in the package (and
155147
its subpackages) where `@SpringBootApplication` is located. If your configuration has

0 commit comments

Comments
 (0)