web/vite.config.ts
@@ -16,7 +16,8 @@ '/api': { target: 'http://localhost:8080', changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, '/api') // 不需要重写路径,因为后端的context-path就是/api // rewrite: (path) => path.replace(/^\/api/, '/api') } } },