问题:TenantRoutingProperties 定义了配置但未被使用 解决方案: 1. TenantAwareLoadBalancer 注入 TenantRoutingProperties - 使用配置的 tenantHeader 名称 - 使用配置的 buildTenantGroup 方法 - 使用配置的 isSharedService 判断 - 使用配置的 isFallbackToShared 策略 2. 新增功能 - 支持 enabled=false 禁用租户路由 - 共享服务跳过租户过滤 - 可配置是否回退到共享实例 3. 更新测试适配新构造函数
49 lines
1.0 KiB
TypeScript
49 lines
1.0 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
import { VantResolver } from '@vant/auto-import-resolver'
|
|
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
Components({
|
|
resolvers: [VantResolver()]
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
}
|
|
},
|
|
server: {
|
|
port: 8080,
|
|
proxy: {
|
|
'/sys': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true
|
|
},
|
|
'/cust': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true
|
|
},
|
|
'/proj': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true
|
|
},
|
|
'/exp': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true
|
|
},
|
|
'/receipt': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true
|
|
},
|
|
'/file': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
}
|
|
})
|