File tree Expand file tree Collapse file tree 2 files changed +38
-3
lines changed
src/main/java/guru/springframework/services Expand file tree Collapse file tree 2 files changed +38
-3
lines changed Original file line number Diff line number Diff line change 5454 </plugins >
5555 </build >
5656
57+ <repositories >
58+ <repository >
59+ <id >spring-snapshots</id >
60+ <name >Spring Snapshots</name >
61+ <url >https://repo.spring.io/snapshot</url >
62+ <snapshots >
63+ <enabled >true</enabled >
64+ </snapshots >
65+ </repository >
66+ <repository >
67+ <id >spring-milestones</id >
68+ <name >Spring Milestones</name >
69+ <url >https://repo.spring.io/milestone</url >
70+ <snapshots >
71+ <enabled >false</enabled >
72+ </snapshots >
73+ </repository >
74+ </repositories >
5775
76+ <pluginRepositories >
77+ <pluginRepository >
78+ <id >spring-snapshots</id >
79+ <name >Spring Snapshots</name >
80+ <url >https://repo.spring.io/snapshot</url >
81+ <snapshots >
82+ <enabled >true</enabled >
83+ </snapshots >
84+ </pluginRepository >
85+ <pluginRepository >
86+ <id >spring-milestones</id >
87+ <name >Spring Milestones</name >
88+ <url >https://repo.spring.io/milestone</url >
89+ <snapshots >
90+ <enabled >false</enabled >
91+ </snapshots >
92+ </pluginRepository >
93+ </pluginRepositories >
5894</project >
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public List<Product> listAll() {
3535
3636 @ Override
3737 public Product getById (String id ) {
38- return productRepository .findOne (id );
38+ return productRepository .findById (id ). orElse ( null );
3939 }
4040
4141 @ Override
@@ -46,8 +46,7 @@ public Product saveOrUpdate(Product product) {
4646
4747 @ Override
4848 public void delete (String id ) {
49- productRepository .delete (id );
50-
49+ productRepository .deleteById (id );
5150 }
5251
5352 @ Override
You can’t perform that action at this time.
0 commit comments