Skip to content

Commit

Permalink
增加 Spring Cache 框架
Browse files Browse the repository at this point in the history
  • Loading branch information
YunaiV committed Apr 3, 2022
1 parent 1cfc0bc commit a426384
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public class TestDemoServiceImpl implements TestDemoService {
private TestDemoMapper testDemoMapper;

@Override
@CacheEvict(value = "test", key = "#createReqVO.id")
public Long createTestDemo(TestDemoCreateReqVO createReqVO) {
// 插入
TestDemoDO testDemo = TestDemoConvert.INSTANCE.convert(createReqVO);
Expand All @@ -53,7 +52,7 @@ public void updateTestDemo(TestDemoUpdateReqVO updateReqVO) {
}

@Override
@CacheEvict(value = "test", key = "'test:' + #id")
@CacheEvict(value = "test", key = "#id")
public void deleteTestDemo(Long id) {
// 校验存在
this.validateTestDemoExists(id);
Expand Down

0 comments on commit a426384

Please sign in to comment.