feat(knowledge): 完成知识库部署相关脚本调整

This commit is contained in:
v-zhangjc9
2025-05-28 18:46:20 +08:00
parent e6e24dff27
commit 8c9cb6f21d
11 changed files with 67 additions and 152 deletions

View File

@@ -0,0 +1,24 @@
package com.lanyuanxiaoyao.service.ai.core.configuration;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* web 配置
*
* @author lanyuanxiaoyao
* @date 2023-04-21
*/
@Configuration
public class WebConfiguration implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
// 避免跨域影响调试
registry.addMapping("/**")
.allowedOriginPatterns("*")
.allowCredentials(true)
.allowedMethods("*")
.maxAge(3600);
}
}