后端功能增强:全局异常处理、API控制器、JSP视图和单元测试
- 添加 GlobalExceptionHandler 全局异常处理 - 添加 ApiController REST API 控制器 - 更新 WebConfig 跨域配置和 ProductRepository 查询方法 - 新增 monitor/product-detail/profile JSP 视图页面 - 添加 FlashSaleServiceTest 秒杀服务单元测试 - 更新 application.yml 配置
This commit is contained in:
39
flash-sale-frontend/src/pages/error/404.vue
Normal file
39
flash-sale-frontend/src/pages/error/404.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<div class="error-404">
|
||||
<div class="container mx-auto px-4 py-16 text-center">
|
||||
<el-icon :size="120" class="text-gray-300 mb-8">
|
||||
<Warning />
|
||||
</el-icon>
|
||||
|
||||
<h1 class="text-6xl font-bold text-gray-800 mb-4">404</h1>
|
||||
<p class="text-2xl text-gray-600 mb-8">页面未找到</p>
|
||||
<p class="text-gray-500 mb-8">抱歉,您访问的页面不存在或已被移除</p>
|
||||
|
||||
<div class="space-x-4">
|
||||
<el-button type="primary" size="large" @click="router.push('/')">
|
||||
<el-icon class="mr-2"><HomeFilled /></el-icon>
|
||||
返回首页
|
||||
</el-button>
|
||||
<el-button size="large" @click="router.back()">
|
||||
<el-icon class="mr-2"><Back /></el-icon>
|
||||
返回上一页
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.error-404 {
|
||||
min-height: calc(100vh - 60px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user