格式化代码
Sync All Branches to GitHub / sync (push) Successful in 3s

This commit is contained in:
hanfuye
2026-01-12 19:39:33 +08:00
parent 2f001c3e9e
commit 1c1490271d
2 changed files with 13 additions and 7 deletions
@@ -15,7 +15,6 @@ import java.time.LocalDateTime;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
/** /**
* *
* @author ayi * @author ayi
@@ -30,7 +29,12 @@ public class TestController {
@GetMapping("/test") @GetMapping("/test")
@ApiOperationLog(description = "测试接口") @ApiOperationLog(description = "测试接口")
public Response<User> testController() { public Response<User> testController() {
return Response.success(User.builder().id(1L).name("ayi").age(18).createTime(LocalDateTime.now()).build()); return Response.success(User.builder()
.id(1L)
.name("ayi")
.age(18)
.createTime(LocalDateTime.now())
.build());
} }
@PostMapping("/test2") @PostMapping("/test2")
@@ -28,7 +28,8 @@ public class RedisTests {
@Test @Test
void testSetKeyValue() { void testSetKeyValue() {
// 添加一个 key 为 name, value 值为 刑加一 // 添加一个 key 为 name, value 值为 刑加一
redisTemplate.opsForValue().set("name", "刑加一"); redisTemplate.opsForValue()
.set("name", "刑加一");
} }
/** /**
@@ -44,7 +45,8 @@ public class RedisTests {
*/ */
@Test @Test
void testGetValue() { void testGetValue() {
log.info("value 值:{}", redisTemplate.opsForValue().get("name")); log.info("value 值:{}", redisTemplate.opsForValue()
.get("name"));
} }
/** /**