加注释喵

This commit is contained in:
KilLze
2026-01-02 11:40:14 +08:00
parent 61d100fac0
commit 0762b84c36
3 changed files with 6 additions and 2 deletions

View File

@@ -7,6 +7,10 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer; import org.springframework.data.redis.serializer.StringRedisSerializer;
/**
* Redis 配置类
* @author KilLze
*/
@Configuration @Configuration
public class RedisConfig { public class RedisConfig {
@Bean @Bean

View File

@@ -69,7 +69,7 @@ public class PostController {
* @param postId 动态ID * @param postId 动态ID
* @return 动态对象 * @return 动态对象
*/ */
@PostMapping("/{postId}") @GetMapping("/{postId}")
public Result<PostEditVO> getPostById(@PathVariable Long postId) { public Result<PostEditVO> getPostById(@PathVariable Long postId) {
PostEditVO postEditVO = postService.getPostForEdit(postId); PostEditVO postEditVO = postService.getPostForEdit(postId);
return Result.success(ResultCode.SUCCESS,"查询成功", postEditVO); return Result.success(ResultCode.SUCCESS,"查询成功", postEditVO);

View File

@@ -100,7 +100,7 @@ public class GlobalExceptionHandler {
@ExceptionHandler(RuntimeException.class) @ExceptionHandler(RuntimeException.class)
public Result<String> handleRuntimeException(RuntimeException e) { public Result<String> handleRuntimeException(RuntimeException e) {
log.error("运行时异常: ", e); log.error("运行时异常: ", e);
return Result.error(ResultCode.SYSTEM_ERROR, "系统异常,请稍后重试"); return Result.error(ResultCode.SYSTEM_ERROR, e.getMessage());
} }
/** /**