重构 jeesite-ai 代码目录,新增 parent-ai,重命名 cms-ai 为 ai-cms
This commit is contained in:
146
web-ai/pom.xml
146
web-ai/pom.xml
@@ -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>
|
||||
@@ -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
153
web-ai/web-ai-cms/pom.xml
Normal 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>
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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:
|
||||
@@ -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">
|
||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
@@ -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
|
||||
Reference in New Issue
Block a user