feat(portal): 案例数据 SQL 与成功案例展示优化
- 新增/更新案例相关 SQL(初始化或补丁脚本) - 首页精选案例:多卡轮播、非精选补足列表、工业风卡片 - 案例列表:无封面时深蓝工业风占位(客户水印与缩写铭牌)
@@ -1,10 +1,13 @@
|
||||
package com.wuhansaga.server.common;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.BindException;
|
||||
import org.springframework.web.bind.MethodArgumentNotValidException;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
import org.springframework.web.servlet.resource.NoResourceFoundException;
|
||||
|
||||
@Slf4j
|
||||
@RestControllerAdvice
|
||||
@@ -34,6 +37,12 @@ public class GlobalExceptionHandler {
|
||||
return R.fail(400, message);
|
||||
}
|
||||
|
||||
@ExceptionHandler(NoResourceFoundException.class)
|
||||
public ResponseEntity<Void> handleNoResourceFound(NoResourceFoundException e) {
|
||||
log.debug("静态资源未找到: {}", e.getResourcePath());
|
||||
return ResponseEntity.status(HttpStatus.NOT_FOUND).build();
|
||||
}
|
||||
|
||||
@ExceptionHandler(Exception.class)
|
||||
public R<Void> handleException(Exception e) {
|
||||
log.error("系统异常", e);
|
||||
|
||||
@@ -35,6 +35,6 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
absolutePath += File.separator;
|
||||
}
|
||||
registry.addResourceHandler("/uploads/**")
|
||||
.addResourceLocations("file:" + absolutePath);
|
||||
.addResourceLocations("file:" + absolutePath, "classpath:/static/bundled-uploads/");
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 287 B |
|
After Width: | Height: | Size: 287 B |
|
After Width: | Height: | Size: 287 B |
|
After Width: | Height: | Size: 287 B |
|
After Width: | Height: | Size: 287 B |
|
After Width: | Height: | Size: 287 B |
|
After Width: | Height: | Size: 287 B |
|
After Width: | Height: | Size: 287 B |
|
After Width: | Height: | Size: 287 B |
|
After Width: | Height: | Size: 287 B |