Commit d2f8d7c9 authored by 高如斌's avatar 高如斌

Merge branch 'develop_tmp' into 'feature/chat-form'

Develop tmp

See merge request !7
parents a2b3a8c8 1ff00b03
...@@ -338,6 +338,16 @@ ...@@ -338,6 +338,16 @@
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
</exclude> </exclude>
</excludes> </excludes>
<requiresUnpack>
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>driver</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>driver-bundle</artifactId>
</dependency>
</requiresUnpack>
</configuration> </configuration>
</plugin> </plugin>
......
...@@ -125,7 +125,7 @@ public class DefaultReactExecutor implements ReactExecutor { ...@@ -125,7 +125,7 @@ public class DefaultReactExecutor implements ReactExecutor {
List<org.springframework.ai.chat.messages.Message> messages = new ArrayList<>(); List<org.springframework.ai.chat.messages.Message> messages = new ArrayList<>();
messages.add(new SystemMessage(systemPrompt)); messages.add(new SystemMessage(systemPrompt));
if (!newChat) {
if (agent != null) { if (agent != null) {
try { try {
// 如果没有提供用户ID,则尝试获取当前用户ID // 如果没有提供用户ID,则尝试获取当前用户ID
...@@ -138,16 +138,13 @@ public class DefaultReactExecutor implements ReactExecutor { ...@@ -138,16 +138,13 @@ public class DefaultReactExecutor implements ReactExecutor {
List<org.springframework.ai.chat.messages.Message> historyMessages = List<org.springframework.ai.chat.messages.Message> historyMessages =
memoryService.getHistoryMessages(sessionId, historyLength); memoryService.getHistoryMessages(sessionId, historyLength);
if (!newChat) {
messages.addAll(historyMessages); messages.addAll(historyMessages);
}
memoryService.addUserMessageToMemory(sessionId, userInput); memoryService.addUserMessageToMemory(sessionId, userInput);
} catch (Exception e) { } catch (Exception e) {
log.warn("获取历史对话记录时发生错误: {}", e.getMessage()); log.warn("获取历史对话记录时发生错误: {}", e.getMessage());
} }
} }
}
messages.add(new UserMessage(userInput)); messages.add(new UserMessage(userInput));
for (Message message : messages) { for (Message message : messages) {
log.info("message is {}", message); log.info("message is {}", message);
...@@ -179,13 +176,17 @@ public class DefaultReactExecutor implements ReactExecutor { ...@@ -179,13 +176,17 @@ public class DefaultReactExecutor implements ReactExecutor {
log.info("agentTools {}", agentTools); log.info("agentTools {}", agentTools);
if (agent.getId().compareToIgnoreCase("agent-8") == 0) { if (agent.getId().compareToIgnoreCase("agent-8") == 0) {
if (!chatService.chatExists(tmpUserId, agent.getId())) { boolean chatExists = chatService.chatExists(tmpUserId, agent.getId());
log.info("new chat for {} {} ", userId, agent.getId()); String newChat = "yes";
prompt = buildPromptWithHistory(defaultSystemPrompt, userInput, agent, tmpUserId, true); if(chatExists){
} newChat = "no";
}
// log.info("new chat for {} {} ", userId, agent.getId());
prompt = buildPromptWithHistory(agent.getSystemPrompt(), userInput, agent, tmpUserId, true);
//}
chatClient.prompt(prompt) chatClient.prompt(prompt)
.tools(agentTools.toArray()) .tools(agentTools.toArray())
.toolContext(Map.of("emitterId", emitterId, "userId", sseTokenEmitter.getUserId(),"agentId",agent.getId())) .toolContext(Map.of("emitterId", emitterId, "userId", sseTokenEmitter.getUserId(), "agentId", agent.getId(),"newChat",newChat))
.stream() .stream()
.chatResponse() .chatResponse()
.subscribe( .subscribe(
......
...@@ -75,7 +75,7 @@ public class VisitorAppointmentTool { ...@@ -75,7 +75,7 @@ public class VisitorAppointmentTool {
// 登录状态有效期(毫秒),设置为30分钟 // 登录状态有效期(毫秒),设置为30分钟
private static final long LOGIN_VALIDITY_PERIOD = 30 * 60 * 1000; private static final long LOGIN_VALIDITY_PERIOD = 30 * 60 * 1000;
public VisitorAppointmentTool(UserTokenService userTokenService,AgentService agentService, InfoCollectorService infoCollectorService, UserSseService userSseService,ChatService chatService) { public VisitorAppointmentTool(UserTokenService userTokenService, AgentService agentService, InfoCollectorService infoCollectorService, UserSseService userSseService, ChatService chatService) {
this.agentService = agentService; this.agentService = agentService;
this.infoCollectorService = infoCollectorService; this.infoCollectorService = infoCollectorService;
this.ssoToken = "33f667865c395f164d29487c15fe74bf76b463f2941ef6af55d14a35a11d60b1"; this.ssoToken = "33f667865c395f164d29487c15fe74bf76b463f2941ef6af55d14a35a11d60b1";
...@@ -141,10 +141,11 @@ public class VisitorAppointmentTool { ...@@ -141,10 +141,11 @@ public class VisitorAppointmentTool {
log.error("海信SSO认证工具的Playwright资源释放失败: ", e); log.error("海信SSO认证工具的Playwright资源释放失败: ", e);
} }
} }
private String setAccessToken(ToolContext toolContext) { private String setAccessToken(ToolContext toolContext) {
String userId = toolContext.getContext().get("userId").toString(); String userId = toolContext.getContext().get("userId").toString();
log.info("start set access token for {}", userId); log.info("start set access token for {}", userId);
UserToken userToken = userTokenService.getUserToken(userId,"pangea"); UserToken userToken = userTokenService.getUserToken(userId, "pangea");
Cookie tripCookie = new Cookie("jwtToken", userToken.getTokenValue()); Cookie tripCookie = new Cookie("jwtToken", userToken.getTokenValue());
tripCookie.setDomain("vrms-proxy.hisense.com"); tripCookie.setDomain("vrms-proxy.hisense.com");
tripCookie.setPath("/"); tripCookie.setPath("/");
...@@ -165,8 +166,6 @@ public class VisitorAppointmentTool { ...@@ -165,8 +166,6 @@ public class VisitorAppointmentTool {
// .setSources(true)); // .setSources(true));
log.info("submit apply info "); log.info("submit apply info ");
String accessToken = setAccessToken(toolContext); String accessToken = setAccessToken(toolContext);
JSONArray jsonArray = infoCollectorService.getInfo(pageId); JSONArray jsonArray = infoCollectorService.getInfo(pageId);
...@@ -196,8 +195,8 @@ public class VisitorAppointmentTool { ...@@ -196,8 +195,8 @@ public class VisitorAppointmentTool {
log.info("json {}", obj); log.info("json {}", obj);
String fieldName = obj.getString("field_name"); String fieldName = obj.getString("field_name");
String fieldValue = infoCollectorService.getValue(obj.getString("code")).toString(); String fieldValue = infoCollectorService.getValue(fieldName).toString();
log.info("fieldName {} fieldValue {} ", fieldName,fieldValue); log.info("fieldName {} fieldValue {} ", fieldName, fieldValue);
if (fieldName.compareToIgnoreCase("访问园区") == 0) { if (fieldName.compareToIgnoreCase("访问园区") == 0) {
parkValue = fieldValue; parkValue = fieldValue;
continue; continue;
...@@ -234,7 +233,7 @@ public class VisitorAppointmentTool { ...@@ -234,7 +233,7 @@ public class VisitorAppointmentTool {
for (JSONObject tmp : dateJson) { for (JSONObject tmp : dateJson) {
String fieldName = tmp.getString("field_name"); String fieldName = tmp.getString("field_name");
String fieldValue = infoCollectorService.getValue(tmp.getString("code")).toString(); String fieldValue = infoCollectorService.getValue(fieldName).toString();
String[] values = fieldValue.split("-"); String[] values = fieldValue.split("-");
page.locator(".van-cell") page.locator(".van-cell")
...@@ -308,7 +307,7 @@ public class VisitorAppointmentTool { ...@@ -308,7 +307,7 @@ public class VisitorAppointmentTool {
infoCollectorService.saveValue(key, infos.get(key)); infoCollectorService.saveValue(key, infos.get(key));
}); });
infoCollectorService.saveDefaultValue(pageId); infoCollectorService.saveDefaultValue(pageId);
Map<String,String> keys = infoCollectorService.findLackInfo(pageId); Map<String, String> keys = infoCollectorService.findLackInfo(pageId);
if (!keys.isEmpty()) { if (!keys.isEmpty()) {
JSONArray jsonArray = infoCollectorService.getInfo(pageId); JSONArray jsonArray = infoCollectorService.getInfo(pageId);
JSONArray lackJson = new JSONArray(); JSONArray lackJson = new JSONArray();
...@@ -316,8 +315,12 @@ public class VisitorAppointmentTool { ...@@ -316,8 +315,12 @@ public class VisitorAppointmentTool {
for (int i = 0; i < jsonArray.size(); i++) { for (int i = 0; i < jsonArray.size(); i++) {
JSONObject tmp = jsonArray.getJSONObject(i); JSONObject tmp = jsonArray.getJSONObject(i);
JSONObject pangeJson = tmp.getJSONObject("pangea_json"); JSONObject pangeJson = tmp.getJSONObject("pangea_json");
if(infoCollectorService.getValue(tmp.getString("code")) != null){ if (infoCollectorService.getValue(tmp.getString("field_name")) != null) {
pangeJson.getJSONObject("props").put("value", infoCollectorService.getValue(tmp.getString("code")).toString()); pangeJson.getJSONObject("props").put("value", infoCollectorService.getValue(tmp.getString("field_name")).toString());
}
if (tmp.getString("field_name").compareToIgnoreCase("接访员工手机号") == 0
|| tmp.getString("field_name").compareToIgnoreCase("接访员工姓名") == 0) {
continue;
} }
lackJson.add(pangeJson); lackJson.add(pangeJson);
} }
...@@ -331,18 +334,15 @@ public class VisitorAppointmentTool { ...@@ -331,18 +334,15 @@ public class VisitorAppointmentTool {
} else { } else {
sb.append("用户还有以下信息未提交:"); sb.append("用户还有以下信息未提交:");
sb.append("\n"); sb.append("\n");
for (Map.Entry<String,String> key : keys.entrySet()) { for (Map.Entry<String, String> key : keys.entrySet()) {
sb.append(key.getValue()); sb.append(key.getValue());
sb.append("(");
sb.append(key);
sb.append(")");
sb.append(","); sb.append(",");
}
sb.append("\n"); sb.append("\n");
}
sb.append("提示用户继续提交信息"); sb.append("提示用户继续提交信息");
} }
log.info("notice {}",sb.toString()); log.info("notice {}", sb.toString());
return sb.toString(); return sb.toString();
} }
...@@ -367,15 +367,23 @@ public class VisitorAppointmentTool { ...@@ -367,15 +367,23 @@ public class VisitorAppointmentTool {
JSONArray lackJson = new JSONArray(); JSONArray lackJson = new JSONArray();
for (int i = 0; i < jsonArray.size(); i++) { for (int i = 0; i < jsonArray.size(); i++) {
JSONObject tmp = jsonArray.getJSONObject(i); JSONObject tmp = jsonArray.getJSONObject(i);
if (tmp.getString("field_name").compareToIgnoreCase("接访员工手机号") == 0
|| tmp.getString("field_name").compareToIgnoreCase("接访员工姓名") == 0) {
continue;
}
lackJson.add(tmp.getJSONObject("pangea_json")); lackJson.add(tmp.getJSONObject("pangea_json"));
} }
JSONObject formMessage = new JSONObject(); JSONObject formMessage = new JSONObject();
formMessage.put("coms", lackJson); formMessage.put("coms", lackJson);
boolean newChat = toolContext.getContext().get("newChat").toString().compareToIgnoreCase("yes") == 0;
log.info("new chat {}", newChat);
if (newChat) {
try { try {
sendFormMessage(formMessage, toolContext); sendFormMessage(formMessage, toolContext);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
}
stringBuilder.append(formMessage.toJSONString()); stringBuilder.append(formMessage.toJSONString());
stringBuilder.append("提示用户以json格式提交信息;如果用户已提供部分信息,需要将这些信息与`props.name`属性的值进行匹配,并将匹配之后的信息以json格式提交到`applyInfoSave`以保存信息"); stringBuilder.append("提示用户以json格式提交信息;如果用户已提供部分信息,需要将这些信息与`props.name`属性的值进行匹配,并将匹配之后的信息以json格式提交到`applyInfoSave`以保存信息");
...@@ -420,8 +428,8 @@ public class VisitorAppointmentTool { ...@@ -420,8 +428,8 @@ public class VisitorAppointmentTool {
JSONArray result = new JSONArray(); JSONArray result = new JSONArray();
for (int i = 0; i < jsonArray.size(); i++) { for (int i = 0; i < jsonArray.size(); i++) {
JSONObject tmp = jsonArray.getJSONObject(i); JSONObject tmp = jsonArray.getJSONObject(i);
if(tmp.getString("field_name").compareToIgnoreCase("接访员工手机号") == 0 if (tmp.getString("field_name").compareToIgnoreCase("接访员工手机号") == 0
|| tmp.getString("field_name").compareToIgnoreCase("接访员工姓名") == 0){ || tmp.getString("field_name").compareToIgnoreCase("接访员工姓名") == 0) {
continue; continue;
} }
result.add(tmp); result.add(tmp);
......
...@@ -5,6 +5,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -5,6 +5,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import jakarta.annotation.PreDestroy; import jakarta.annotation.PreDestroy;
import java.util.concurrent.*; import java.util.concurrent.*;
/** /**
...@@ -31,8 +32,7 @@ public class PlaywrightManagerImpl implements PlaywrightManager { ...@@ -31,8 +32,7 @@ public class PlaywrightManagerImpl implements PlaywrightManager {
private static final long CONTEXT_TIMEOUT = 30 * 60 * 1000; private static final long CONTEXT_TIMEOUT = 30 * 60 * 1000;
// 清理任务调度器 // 清理任务调度器
private final ScheduledExecutorService cleanupScheduler = private final ScheduledExecutorService cleanupScheduler = Executors.newSingleThreadScheduledExecutor(r -> {
Executors.newSingleThreadScheduledExecutor(r -> {
Thread t = new Thread(r, "PlaywrightCleanupScheduler"); Thread t = new Thread(r, "PlaywrightCleanupScheduler");
t.setDaemon(true); // 设置为守护线程 t.setDaemon(true); // 设置为守护线程
return t; return t;
...@@ -55,8 +55,10 @@ public class PlaywrightManagerImpl implements PlaywrightManager { ...@@ -55,8 +55,10 @@ public class PlaywrightManagerImpl implements PlaywrightManager {
log.info("正在初始化Playwright管理器..."); log.info("正在初始化Playwright管理器...");
// 创建Playwright实例 // 创建Playwright实例
if (playwright == null) {
this.playwright = Playwright.create(); this.playwright = Playwright.create();
}
if (browser == null) {
// 启动Chrome浏览器,无头模式 // 启动Chrome浏览器,无头模式
this.browser = playwright.chromium().launch(new BrowserType.LaunchOptions() this.browser = playwright.chromium().launch(new BrowserType.LaunchOptions()
.setHeadless(true) .setHeadless(true)
...@@ -66,9 +68,22 @@ public class PlaywrightManagerImpl implements PlaywrightManager { ...@@ -66,9 +68,22 @@ public class PlaywrightManagerImpl implements PlaywrightManager {
"--disable-gpu", "--disable-gpu",
"--remote-allow-origins=*"))); "--remote-allow-origins=*")));
this.browser.onDisconnected((browser) -> {
log.info("浏览器实例已断开连接");
this.browser.close();
userContexts.clear();
this.browser = playwright.chromium().launch(new BrowserType.LaunchOptions()
.setHeadless(true)
.setArgs(java.util.Arrays.asList(
"--no-sandbox",
"--disable-dev-shm-usage",
"--disable-gpu",
"--remote-allow-origins=*")));
});
}
// 每5分钟检查一次超时的用户上下文 // 每5分钟检查一次超时的用户上下文
cleanupScheduler.scheduleAtFixedRate(this::cleanupExpiredContexts, cleanupScheduler.scheduleAtFixedRate(this::cleanupExpiredContexts,
5, 5, TimeUnit.MINUTES); 5, 3600, TimeUnit.MINUTES);
this.initialized = true; this.initialized = true;
log.info("Playwright管理器初始化成功"); log.info("Playwright管理器初始化成功");
...@@ -83,10 +98,10 @@ public class PlaywrightManagerImpl implements PlaywrightManager { ...@@ -83,10 +98,10 @@ public class PlaywrightManagerImpl implements PlaywrightManager {
// 移除@PostConstruct注解,避免在Spring初始化时自动调用 // 移除@PostConstruct注解,避免在Spring初始化时自动调用
/* /*
@PostConstruct * @PostConstruct
public void initialize() { * public void initialize() {
lazyInitialize(); * lazyInitialize();
} * }
*/ */
@Override @Override
...@@ -112,7 +127,10 @@ public class PlaywrightManagerImpl implements PlaywrightManager { ...@@ -112,7 +127,10 @@ public class PlaywrightManagerImpl implements PlaywrightManager {
lazyInitialize(); lazyInitialize();
Browser.NewContextOptions options = new Browser.NewContextOptions() Browser.NewContextOptions options = new Browser.NewContextOptions()
.setViewportSize(1920, 1080) // 设置视口大小为全高清分辨率,适用于Windows 11桌面环境 .setViewportSize(1920, 1080) // 设置视口大小为全高清分辨率,适用于Windows 11桌面环境
.setUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"); // 设置用户代理为Windows 11 Chrome浏览器 .setUserAgent(
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"); // 设置用户代理为Windows
// 11
// Chrome浏览器
return getUserContext(userId, options); return getUserContext(userId, options);
} }
......
package pangea.hiagent.web.repository; package pangea.hiagent.web.repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import pangea.hiagent.model.AgentDialogue; import pangea.hiagent.model.AgentDialogue;
/** /**
...@@ -9,4 +11,6 @@ import pangea.hiagent.model.AgentDialogue; ...@@ -9,4 +11,6 @@ import pangea.hiagent.model.AgentDialogue;
*/ */
@Mapper @Mapper
public interface AgentDialogueRepository extends BaseMapper<AgentDialogue> { public interface AgentDialogueRepository extends BaseMapper<AgentDialogue> {
@Delete("DELETE FROM agent_dialogue WHERE user_id = #{userId} AND agent_id=#{agentId} ")
public void deleteDialogue(String userId,String agentId);
} }
package pangea.hiagent.web.service; package pangea.hiagent.web.service;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import pangea.hiagent.web.repository.AgentDialogueRepository;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
...@@ -10,6 +12,9 @@ import java.util.concurrent.ConcurrentMap; ...@@ -10,6 +12,9 @@ import java.util.concurrent.ConcurrentMap;
@Service @Service
public class ChatService { public class ChatService {
@Autowired
private AgentDialogueRepository agentDialogueRepository;
private final ConcurrentMap<String,String> chatList = new ConcurrentHashMap<>(1024); private final ConcurrentMap<String,String> chatList = new ConcurrentHashMap<>(1024);
public boolean chatExists(String userId,String agentId) { public boolean chatExists(String userId,String agentId) {
...@@ -26,6 +31,7 @@ public class ChatService { ...@@ -26,6 +31,7 @@ public class ChatService {
String chatId = buildChatId(userId,agentId); String chatId = buildChatId(userId,agentId);
log.info("remove chatId:{}",chatId); log.info("remove chatId:{}",chatId);
chatList.remove(chatId); chatList.remove(chatId);
agentDialogueRepository.deleteDialogue(userId,agentId);
} }
private String buildChatId(String userId,String agentId) { private String buildChatId(String userId,String agentId) {
......
...@@ -52,15 +52,15 @@ public class InfoCollectorService { ...@@ -52,15 +52,15 @@ public class InfoCollectorService {
for(int i = 0; i < jsonArray.size(); i++){ for(int i = 0; i < jsonArray.size(); i++){
JSONObject object = jsonArray.getJSONObject(i); JSONObject object = jsonArray.getJSONObject(i);
if(object.getString("field_name").compareToIgnoreCase("接访员工手机号") == 0){ if(object.getString("field_name").compareToIgnoreCase("接访员工手机号") == 0){
String code = object.getString("code"); String code = object.getString("field_name");
saveValue(code, "15841169015"); saveValue(code, "15841169015");
} }
if(object.getString("field_name").compareToIgnoreCase("接访员工姓名") == 0){ if(object.getString("field_name").compareToIgnoreCase("接访员工姓名") == 0){
String code = object.getString("code"); String code = object.getString("field_name");
saveValue(code, "杜艺"); saveValue(code, "杜艺");
} }
if(object.getString("field_name").compareToIgnoreCase("证件类型") == 0){ if(object.getString("field_name").compareToIgnoreCase("证件类型") == 0){
String code = object.getString("code"); String code = object.getString("field_name");
saveValue(code, "居民身份证"); saveValue(code, "居民身份证");
} }
} }
...@@ -73,7 +73,7 @@ public class InfoCollectorService { ...@@ -73,7 +73,7 @@ public class InfoCollectorService {
public Map<String,String> findLackInfo(String pageId) { public Map<String,String> findLackInfo(String pageId) {
Set<String> valueKeys = values.keySet(); Set<String> valueKeys = values.keySet();
log.info("value keys {}", valueKeys); log.info("value keys {}", valueKeys);
Set<String> allKeys = infos.get(pageId).stream().map(t -> ((JSONObject) t).getString("code")).collect(Collectors.toSet()); Set<String> allKeys = infos.get(pageId).stream().map(t -> ((JSONObject) t).getString("field_name")).collect(Collectors.toSet());
log.info("all keys {}", allKeys); log.info("all keys {}", allKeys);
allKeys.removeAll(valueKeys); allKeys.removeAll(valueKeys);
log.info("lack keys {}", allKeys); log.info("lack keys {}", allKeys);
...@@ -86,7 +86,7 @@ public class InfoCollectorService { ...@@ -86,7 +86,7 @@ public class InfoCollectorService {
infos.get(pageId).stream().forEach(t -> infos.get(pageId).stream().forEach(t ->
{ {
JSONObject info = (JSONObject) t; JSONObject info = (JSONObject) t;
String code = info.getString("code"); String code = info.getString("field_name");
if (allKeys.contains(code)) { if (allKeys.contains(code)) {
lackInfos.put(code,info.getString("field_name")); lackInfos.put(code,info.getString("field_name"));
} }
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
spring: spring:
# 开发环境数据源配置 # 开发环境数据源配置
datasource: datasource:
url: jdbc:h2:file:./data/hiagent_dev_db;DB_CLOSE_ON_EXIT=FALSE url: jdbc:mysql://${DB_HOST:127.0.0.1}:3306/hiagent?allowMultiQueries=true&allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=Asia/Shanghai
driver-class-name: org.h2.Driver driver-class-name: ${DB_DRIVER:com.mysql.cj.jdbc.Driver}
username: sa username: ${DB_NAME:root}
password: sa password: ${DB_PASSWORD:password}
# 开发环境JPA配置 # 开发环境JPA配置
jpa: jpa:
...@@ -21,7 +21,7 @@ spring: ...@@ -21,7 +21,7 @@ spring:
init: init:
schema-locations: classpath:schema.sql schema-locations: classpath:schema.sql
data-locations: classpath:data.sql data-locations: classpath:data.sql
mode: always # 总是执行创建表和数据脚本,实现重新初始化 mode: never # 总是执行创建表和数据脚本,实现重新初始化
# 开启H2控制台 # 开启H2控制台
h2: h2:
......
/*
* @Date: 2025-12-29 14:42:27
* @LastEditors: wangduo3 wangduo3@hisense.com
* @LastEditTime: 2025-12-29 16:56:52
* @FilePath: /pangea-agent/frontend/vite.config.ts
*/
import { defineConfig } from "vite"; import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue"; import vue from "@vitejs/plugin-vue";
import path from "path"; import path from "path";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment