重构 jeesite-ai 代码目录,新增 parent-ai,重命名 cms-ai 为 ai-cms

This commit is contained in:
thinkgem
2025-10-19 13:16:33 +08:00
parent ac4d05cda7
commit 5dfb735186
48 changed files with 414 additions and 199 deletions

View File

@@ -41,7 +41,7 @@
<suspend_validator>false</suspend_validator>
<export_setting>
<export_ddl_setting>
<output_path>db/cms-ai.sql</output_path>
<output_path>db/ai-cms.sql</output_path>
<encoding>UTF-8</encoding>
<line_feed>CR+LF</line_feed>
<is_open_after_saved>false</is_open_after_saved>
@@ -73,7 +73,7 @@
</export_ddl_setting>
<export_excel_setting>
<category_id>null</category_id>
<output_path>db/cms-ai.xls</output_path>
<output_path>db/ai-cms.xls</output_path>
<template></template>
<template_path></template_path>
<used_default_template_lang>en</used_default_template_lang>
@@ -89,7 +89,7 @@
<is_open_after_saved>true</is_open_after_saved>
</export_html_setting>
<export_image_setting>
<output_file_path>db/cms-ai.png</output_file_path>
<output_file_path>db/ai-cms.png</output_file_path>
<category_dir_path></category_dir_path>
<with_category_image>true</with_category_image>
<is_open_after_saved>true</is_open_after_saved>

View File

@@ -5,24 +5,22 @@
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<artifactId>jeesite-parent-ai</artifactId>
<version>5.14.0.springboot3-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
<relativePath>../../../parent/ai/pom.xml</relativePath>
</parent>
<artifactId>jeesite-module-cms-ai</artifactId>
<artifactId>jeesite-module-ai-cms</artifactId>
<packaging>jar</packaging>
<name>JeeSite Module CMS+RAG+AI</name>
<name>JeeSite Module AI + CMS + RAG</name>
<url>http://jeesite.com</url>
<inceptionYear>2013-Now</inceptionYear>
<properties>
<spring-ai.version>1.0.3</spring-ai.version>
</properties>
<dependencies>
<!-- 核心模块 --><!--suppress VulnerableLibrariesLocal -->
@@ -39,7 +37,7 @@
<version>${project.parent.version}</version>
</dependency>
<!-- 在线大模型 -->
<!-- 云端模型 -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-model-openai</artifactId>
@@ -119,20 +117,21 @@
<artifactId>commons-compress</artifactId>
<version>1.27.1</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-bom</artifactId>
<version>${spring-ai.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- Ai Tools -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-ai-tools</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- MCP Client -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-mcp-client</artifactId>
</dependency>
</dependencies>
<developers>
<developer>

View File

@@ -2,7 +2,7 @@
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
*/
package com.jeesite.modules.cms.ai.config;
package com.jeesite.modules.ai.cms.config;
import com.jeesite.common.config.Global;
import org.springframework.context.annotation.Bean;
@@ -16,7 +16,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
* @author ThinkGem
*/
@Configuration
public class CmsAiWebMvcConfig implements WebMvcConfigurer {
public class AiCmsWebMvcConfig implements WebMvcConfigurer {
@Override
public void configureAsyncSupport(AsyncSupportConfigurer configurer) {

View File

@@ -2,7 +2,7 @@
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
*/
package com.jeesite.modules.cms.ai.service;
package com.jeesite.modules.ai.cms.service;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.collect.MapUtils;

View File

@@ -2,7 +2,7 @@
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
*/
package com.jeesite.modules.cms.ai.service;
package com.jeesite.modules.ai.cms.service;
import com.jeesite.common.cache.CacheUtils;
import org.jetbrains.annotations.NotNull;

View File

@@ -2,11 +2,11 @@
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
*/
package com.jeesite.modules.cms.ai.web;
package com.jeesite.modules.ai.cms.web;
import com.jeesite.common.config.Global;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.cms.ai.service.CmsAiChatService;
import com.jeesite.modules.ai.cms.service.AiCmsChatService;
import com.jeesite.modules.sys.entity.Area;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.ai.chat.messages.Message;
@@ -31,10 +31,10 @@ import java.util.stream.Collectors;
@RequestMapping("${adminPath}/cms/chat")
public class CmsAiChatController extends BaseController {
private final CmsAiChatService cmsAiChatService;
private final AiCmsChatService aiCmsChatService;
public CmsAiChatController(CmsAiChatService cmsAiChatService) {
this.cmsAiChatService = cmsAiChatService;
public CmsAiChatController(AiCmsChatService aiCmsChatService) {
this.aiCmsChatService = aiCmsChatService;
}
/**
@@ -43,7 +43,7 @@ public class CmsAiChatController extends BaseController {
*/
@RequestMapping("/message")
public List<Message> message(String id) {
return cmsAiChatService.getChatMessage(id);
return aiCmsChatService.getChatMessage(id);
}
/**
@@ -52,7 +52,7 @@ public class CmsAiChatController extends BaseController {
*/
@RequestMapping("/list")
public Collection<Map<String, Object>> list() {
return cmsAiChatService.getChatCacheMap().values().stream()
return aiCmsChatService.getChatCacheMap().values().stream()
.sorted(Comparator.comparing(map -> (String) map.get("id"),
Comparator.reverseOrder())).collect(Collectors.toList());
}
@@ -63,7 +63,7 @@ public class CmsAiChatController extends BaseController {
*/
@RequestMapping("/save")
public String save(String id, String title) {
Map<String, Object> map = cmsAiChatService.saveChatConversation(id, title);
Map<String, Object> map = aiCmsChatService.saveChatConversation(id, title);
return renderResult(Global.TRUE, "保存成功", map);
}
@@ -73,7 +73,7 @@ public class CmsAiChatController extends BaseController {
*/
@RequestMapping("/delete")
public String delete(@RequestParam String id) {
cmsAiChatService.deleteChatConversation(id);
aiCmsChatService.deleteChatConversation(id);
return renderResult(Global.TRUE, "删除成功", id);
}
@@ -84,7 +84,7 @@ public class CmsAiChatController extends BaseController {
*/
@RequestMapping(value = "/stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public Flux<ChatResponse> stream(@RequestParam String id, @RequestParam String message, HttpServletRequest request) {
return cmsAiChatService.chatStream(id, message, request);
return aiCmsChatService.chatStream(id, message, request);
}
/**
@@ -94,7 +94,7 @@ public class CmsAiChatController extends BaseController {
*/
@RequestMapping(value = "/text")
public String text(@RequestParam String message) {
return cmsAiChatService.chatText(message);
return aiCmsChatService.chatText(message);
}
/**
@@ -105,7 +105,7 @@ public class CmsAiChatController extends BaseController {
*/
@RequestMapping(value = "/json")
public Map<String, Object> json(@RequestParam String message) {
return cmsAiChatService.chatJson(message);
return aiCmsChatService.chatJson(message);
}
/**
@@ -115,7 +115,7 @@ public class CmsAiChatController extends BaseController {
*/
@RequestMapping(value = "/entity")
public List<Area> entity(@RequestParam String message) {
return cmsAiChatService.chatArea(message);
return aiCmsChatService.chatArea(message);
}
}

View File

@@ -2,11 +2,11 @@
## 重要提示Tip
## 请勿在该配置文件中添加其它任何配置(添加也不会生效)。
## 该文件,仅仅是为了让 jeesite-cms-ai.yml 文件,
## 该文件,仅仅是为了让 jeesite-ai-cms.yml 文件,
## 在 IDEA 中有一个自动完成及帮助提示,并无其它用意。
## 参数配置请在 jeesite-cms-ai.yml 文件中添加。
## 参数配置请在 jeesite-ai-cms.yml 文件中添加。
spring:
config:
import:
- classpath:config/jeesite-cms-ai.yml
- classpath:config/jeesite-ai-cms.yml

View File

@@ -0,0 +1,5 @@
5.11.1
5.12.0
5.12.1
5.13.0
5.13.1

40
modules/ai/pom.xml Normal file
View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent-ai</artifactId>
<version>5.14.0.springboot3-SNAPSHOT</version>
<relativePath>../../parent/ai/pom.xml</relativePath>
</parent>
<artifactId>jeesite-module-ai</artifactId>
<packaging>pom</packaging>
<name>JeeSite Module AI</name>
<url>http://jeesite.com</url>
<inceptionYear>2013-Now</inceptionYear>
<modules>
<module>ai-cms</module>
<module>ai-tools</module>
</modules>
<developers>
<developer>
<id>thinkgem</id>
<name>WangZhen</name>
<email>thinkgem at 163.com</email>
<roles><role>Project lead</role></roles>
<timezone>+8</timezone>
</developer>
</developers>
<organization>
<name>JeeSite</name>
<url>http://jeesite.com</url>
</organization>
</project>

22
parent/ai/bin/deploy.bat Normal file
View File

@@ -0,0 +1,22 @@
@echo off
rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * No deletion without permission, or be held responsible to law.
rem *
rem * Author: ThinkGem@163.com
rem */
echo.
echo [<5B><>Ϣ] <20><><EFBFBD>𹤳̵<F0B9A4B3>Maven<65><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
echo.
%~d0
cd %~dp0
call mvn -v
echo.
cd ..
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy
cd bin
pause

18
parent/ai/bin/deploy.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
# /**
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
# * No deletion without permission, or be held responsible to law.
# *
# * Author: ThinkGem@163.com
# */
echo ""
echo "[信息] 部署工程到Maven服务器。"
echo ""
mvn -v
echo ""
cd ..
mvn clean deploy -Dmaven.test.skip=true -Pdeploy
cd bin

22
parent/ai/bin/package.bat Normal file
View File

@@ -0,0 +1,22 @@
@echo off
rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * No deletion without permission, or be held responsible to law.
rem *
rem * Author: ThinkGem@163.com
rem */
echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
echo.
%~d0
cd %~dp0
call mvn -v
echo.
cd ..
call mvn clean install -Dmaven.test.skip=true -Ppackage
cd bin
pause

18
parent/ai/bin/package.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
# /**
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
# * No deletion without permission, or be held responsible to law.
# *
# * Author: ThinkGem@163.com
# */
echo ""
echo "[信息] 打包安装工程生成jar包文件。"
echo ""
mvn -v
echo ""
cd ..
mvn clean install -Dmaven.test.skip=true -Ppackage
cd bin

53
parent/ai/pom.xml Normal file
View File

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>5.14.0.springboot3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>jeesite-parent-ai</artifactId>
<packaging>pom</packaging>
<name>JeeSite Module AI Parent</name>
<url>http://jeesite.com</url>
<inceptionYear>2013-Now</inceptionYear>
<properties>
<spring-ai.version>1.0.3</spring-ai.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-bom</artifactId>
<version>${spring-ai.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<developers>
<developer>
<id>thinkgem</id>
<name>WangZhen</name>
<email>thinkgem at 163.com</email>
<roles><role>Project lead</role></roles>
<timezone>+8</timezone>
</developer>
</developers>
<organization>
<name>JeeSite</name>
<url>http://jeesite.com</url>
</organization>
</project>

View File

@@ -2,114 +2,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>5.14.0.springboot3-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
<artifactId>jeesite-web-ai</artifactId>
<packaging>war</packaging>
<description>Web AI 服务</description>
<name>JeeSite Web AI</name>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-web-ai</artifactId>
<version>5.14.0.springboot3-SNAPSHOT</version>
<packaging>pom</packaging>
<name>JeeSite Module Web AI</name>
<url>http://jeesite.com</url>
<inceptionYear>2013-Now</inceptionYear>
<properties>
<finalName>web</finalName><!-- war 或 jar 包的名称 -->
<start-class>com.jeesite.modules.AiApplication</start-class>
<!-- docker setting -->
<docker.run.port>8980:8980</docker.run.port>
</properties>
<modules>
<module>web-ai-cms</module>
<module>web-ai-mcp</module>
</modules>
<dependencies>
<!-- 核心模块 --><!--suppress VulnerableLibrariesLocal -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-core</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- 测试模块 -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-test</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- 内容管理模块 -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-cms</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- 内容管理 AI + RAG 模块 -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-cms-ai</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- Vue发布包 https://gitee.com/thinkgem/jeesite-vue -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-vue-dist</artifactId>
<version>5.14.0-SNAPSHOT</version>
</dependency>
<!-- 热部署工具
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency> -->
</dependencies>
<build>
<finalName>${finalName}</finalName>
<!--<outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/classes/</outputDirectory>-->
<plugins>
<!-- Spring Boot -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<!-- war插件war包名称不带版本号 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warName>${finalName}</warName>
</configuration>
</plugin>
<!-- Eclipse 插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<wtpContextName>${finalName}</wtpContextName>
</configuration>
</plugin>
</plugins>
</build>
<developers>
<developer>
<id>thinkgem</id>
@@ -119,35 +26,10 @@
<timezone>+8</timezone>
</developer>
</developers>
<organization>
<name>JeeSite</name>
<url>http://jeesite.com</url>
</organization>
<repositories>
<repository>
<id>aliyun-repos</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
<repository>
<id>jeesite-repos</id>
<url>https://maven.jeesite.net/repository/maven-public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>aliyun-repos</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</pluginRepository>
<pluginRepository>
<id>jeesite-repos</id>
<url>https://maven.jeesite.net/repository/maven-public</url>
</pluginRepository>
</pluginRepositories>
</project>
</project>

View File

@@ -1,14 +1,15 @@
## 介绍
jeesite-web-ai 拷贝自 jeesite-web 只保留了 AI 模块的引用,
jeesite-web-ai-cms 拷贝自 jeesite-web 只保留了 CMS 和 AI 模块的引用,
可直接运行 AiApplication.java 文件,启动一个 Web 服务。
可直接运行 AiCmsApplication.java 文件,启动一个 Web 服务。
启动 Web 服务后,可通过网页浏览器访问 JeeSite 系统。
## 更多介绍
1. <https://gitee.com/thinkgem/jeesite5/blob/v5.springboot3/modules/cms-ai/README.md>
1. <https://jeesite.com/docs/cms-ai/>
2. <https://jeesite.com/docs/cms/>
## 文档

153
web-ai/web-ai-cms/pom.xml Normal file
View File

@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>5.14.0.springboot3-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
<artifactId>jeesite-web-ai-cms</artifactId>
<packaging>war</packaging>
<description>Web AI CMS 服务</description>
<name>JeeSite Web AI</name>
<url>http://jeesite.com</url>
<inceptionYear>2013-Now</inceptionYear>
<properties>
<finalName>web</finalName><!-- war 或 jar 包的名称 -->
<start-class>com.jeesite.modules.AiCmsApplication</start-class>
<!-- docker setting -->
<docker.run.port>8980:8980</docker.run.port>
</properties>
<dependencies>
<!-- 核心模块 --><!--suppress VulnerableLibrariesLocal -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-core</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- 测试模块 -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-test</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- 内容管理模块 -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-cms</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- 内容管理 AI + RAG 模块 -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-ai-cms</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- Vue发布包 https://gitee.com/thinkgem/jeesite-vue -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-vue-dist</artifactId>
<version>5.14.0-SNAPSHOT</version>
</dependency>
<!-- 热部署工具
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency> -->
</dependencies>
<build>
<finalName>${finalName}</finalName>
<!--<outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/classes/</outputDirectory>-->
<plugins>
<!-- Spring Boot -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<!-- war插件war包名称不带版本号 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warName>${finalName}</warName>
</configuration>
</plugin>
<!-- Eclipse 插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<wtpContextName>${finalName}</wtpContextName>
</configuration>
</plugin>
</plugins>
</build>
<developers>
<developer>
<id>thinkgem</id>
<name>WangZhen</name>
<email>thinkgem at 163.com</email>
<roles><role>Project lead</role></roles>
<timezone>+8</timezone>
</developer>
</developers>
<organization>
<name>JeeSite</name>
<url>http://jeesite.com</url>
</organization>
<repositories>
<repository>
<id>aliyun-repos</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
<repository>
<id>jeesite-repos</id>
<url>https://maven.jeesite.net/repository/maven-public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>aliyun-repos</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</pluginRepository>
<pluginRepository>
<id>jeesite-repos</id>
<url>https://maven.jeesite.net/repository/maven-public</url>
</pluginRepository>
</pluginRepositories>
</project>

View File

@@ -19,35 +19,36 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
* @author ThinkGem
*/
@SpringBootApplication
public class AiApplication extends SpringBootServletInitializer {
public class AiCmsApplication extends SpringBootServletInitializer {
private static final Logger logger = LoggerFactory.getLogger(AiApplication.class);
private static final Logger logger = LoggerFactory.getLogger(AiCmsApplication.class);
public static void main(String[] args) {
SpringApplication.run(AiApplication.class, args);
SpringApplication.run(AiCmsApplication.class, args);
String vuePath = Global.getProperty("vuePath");
String ctxPath = Global.getProperty("server.servlet.context-path");
if (StringUtils.isNoneBlank(vuePath) && !StringUtils.equals(ctxPath, "/js")) {
logger.info(
"\r\n\r\n==============================================================\r\n"
+ "\r\n 提示:您修改了 server.servlet.context-path 参数,需要您"
+ "\r\n 同步修改 _app.config.js 中的 VITE_GLOB_API_URL_PREFIX 参数 "
+ "\r\n 请修改为 VITE_GLOB_API_URL_PREFIX=\"" + ctxPath + "\""
+ "\r\n\r\n==============================================================\r\n");
"\n\n==============================================================\n"
+ "\n 提示:您修改了 server.servlet.context-path 参数,需要您"
+ "\n 同步修改 _app.config.js 中的 VITE_GLOB_API_URL_PREFIX 参数 "
+ "\n 请修改为 VITE_GLOB_API_URL_PREFIX=\"{}\" 并重新打包 Vue\n"
+ "\n==============================================================\n",
ctxPath);
}
logger.info(
"\r\n\r\n==============================================================\r\n"
+ "\r\n 启动完成访问地址http://127.0.0.1:"
+ Global.getProperty("server.port") + FileUtils.path("/"
+ Global.getProperty("server.servlet.context-path"))
+ "\r\n\r\n 默认管理账号: system 密码: admin"
+ "\r\n\r\n==============================================================\r\n");
"\n\n==============================================================\n"
+ "\n 启动完成访问地址http://127.0.0.1:{}\n"
+ "\n 默认管理账号: system 密码: admin\n"
+ "\n==============================================================\n",
Global.getProperty("server.port") + FileUtils.path("/"
+ Global.getProperty("server.servlet.context-path")));
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
this.setRegisterErrorPageFilter(false); // 错误页面有容器来处理而不是SpringBoot
return builder.sources(AiApplication.class);
return builder.sources(AiCmsApplication.class);
}
}

View File

@@ -4,7 +4,7 @@
#======================================#
# 产品或项目名称、软件开发公司名称
productName: JeeSite Demo
productName: JeeSite AI CMS
companyName: ThinkGem
# 产品版本、版权年份
@@ -98,7 +98,7 @@ spring:
# 打印横幅
main:
banner-mode: "off"
lazy-initialization: true
lazy-initialization: false
# # MVC 映射匹配策略
# mvc:

View File

@@ -9,6 +9,8 @@
<!-- Project level setting -->
<!-- <logger name="your.package" level="DEBUG" /> -->
<!-- <logger name="org.springframework.ai" level="TRACE" />-->
<!-- <logger name="com.jeesite.modules.ai.cms.config.WebClientThinkConfig" level="TRACE" />-->
<!-- Console log output -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -9,14 +9,14 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import com.jeesite.common.tests.BaseInitDataTests;
import com.jeesite.modules.AiApplication;
import com.jeesite.modules.AiCmsApplication;
/**
* 初始化数据表
* @author ThinkGem
*/
@ActiveProfiles("test")
@SpringBootTest(classes = AiApplication.class)
@SpringBootTest(classes = AiCmsApplication.class)
public class InitData extends BaseInitDataTests {
@Test