|
8 | 8 | 2. Issues
|
9 | 9 | ---------
|
10 | 10 | - Generics, simple queries, pagination (no metadata), is new?, arbitrary queries
|
11 |
| -- Approach: step by step refactoring -> introduce Hades |
| 11 | +- Approach: step by step refactoring -> introduce Spring Data JPA |
12 | 12 |
|
13 |
| -3. CustomerRepository |
14 |
| ---------------------- |
15 |
| -- add dependency to CustomerServiceImpl |
16 |
| -- replace findById, findAll, save |
17 |
| -- run test |
| 13 | +5. AccountRepository |
| 14 | +-------------------- |
| 15 | +- replace save(…) |
| 16 | +- findByCustomer -> show log -> method created from method name |
| 17 | +- explain proxy mechanism, method signature possibilities (@Param, return types) |
18 | 18 |
|
19 | 19 | 4. Explain general proxy mechanism, SimpleJpaRepository
|
20 | 20 | -------------------------------------------------
|
21 |
| -- show GenericDao interface |
| 21 | +- show JpaRepository interface |
22 | 22 | - findAll(Pageable pageble)
|
23 | 23 |
|
24 |
| -5. AccountRepository |
25 |
| --------------------- |
26 |
| -- replace saven(…) |
27 |
| -- findByCustomer -> show log -> method created from method name |
28 |
| -- explain proxy mechanism, methods signature possibilities (@Param, return types, Pageable, Sort) |
29 |
| -- -> replace findByLastname(Pageable pageable) in CustomerService |
| 24 | +3. CustomerRepository |
| 25 | +--------------------- |
| 26 | +- add dependency to CustomerServiceImpl |
| 27 | +- replace findById, findAll, save |
| 28 | +- run test |
| 29 | +- explain extended method signature possibilities (Pageable, Sort) |
| 30 | +- replace findByLastname(Pageable pageable) in CustomerService |
30 | 31 |
|
31 | 32 | 6. First summary
|
32 | 33 | ----------------
|
33 | 34 | - implementation got obsolete
|
34 | 35 | - switch to after package
|
35 |
| --- alter packages to .after, remove component scan element |
36 | 36 |
|
37 | 37 | 7. Custom implementation
|
38 | 38 | ------------------------
|
|
0 commit comments