init: 导入团队知识库内容
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
FROM crpi-kf13onfj0v8f6jax.cn-shanghai.personal.cr.aliyuncs.com/qiantongkeji/eclipse-temurin:8-jre
|
||||
|
||||
# 设置时区和应用目录
|
||||
ENV TZ=Asia/Shanghai \
|
||||
APP_HOME=/usr/app/jar
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
|
||||
&& echo $TZ > /etc/timezone \
|
||||
&& mkdir -p $APP_HOME
|
||||
|
||||
WORKDIR $APP_HOME
|
||||
|
||||
# 拷贝产物
|
||||
COPY ./target/*.jar ./qmodel-server.jar
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["java", "-Xms512m", "-Xmx2g", "-Dspring.profiles.active=prod","-jar","qmodel-server.jar"]
|
||||
CMD ["--server.port=8080"]
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 创建 builder(关键一步)
|
||||
docker buildx create \
|
||||
--name qmodel-builder \
|
||||
--driver docker-container \
|
||||
--use
|
||||
|
||||
# 启动 builder(加载 QEMU 等)
|
||||
docker buildx inspect --bootstrap
|
||||
|
||||
# 构建 AMD64(x86_64)版本
|
||||
cd /mnt/c/Users/Ming/Desktop/qModel/qmodel-server-ce # 路径改成你自己的路径
|
||||
|
||||
docker buildx build \
|
||||
--platform linux/amd64 \
|
||||
--no-cache \
|
||||
-t crpi-kf13onfj0v8f6jax.cn-shanghai.personal.cr.aliyuncs.com/qiantongkeji/qmodel-server-ce:1.0.1 \
|
||||
--file=docker/Dockerfile \
|
||||
--load \
|
||||
/mnt/c/Users/Ming/Desktop/qModel/qmodel-server-ce # 上下文路径改成你自己的路径
|
||||
|
||||
# 构建 ARM64(适配鲲鹏、飞腾、树莓派等 ARM 服务器)
|
||||
docker buildx build \
|
||||
--platform linux/arm64 \
|
||||
--no-cache \
|
||||
-t crpi-kf13onfj0v8f6jax.cn-shanghai.personal.cr.aliyuncs.com/qiantongkeji/qmodel-server-ce:1.0.1 \
|
||||
--file=docker/Dockerfile \
|
||||
--load \
|
||||
/mnt/c/Users/Ming/Desktop/qModel/qmodel-server-ce # 上下文路径改成你自己的路径
|
||||
|
||||
# 检查是否支持 ARM64
|
||||
docker inspect crpi-kf13onfj0v8f6jax.cn-shanghai.personal.cr.aliyuncs.com/qiantongkeji/qmodel-server-ce:1.0.1 --format '{{.Architecture}}'
|
||||
|
||||
# 删掉之前建的 builder(可选但建议,保持干净)
|
||||
docker buildx rm qmodel-builder
|
||||
|
||||
# 启动新容器
|
||||
docker run -d \
|
||||
--name qmodel-server-ce \
|
||||
-p 8080:8080 \
|
||||
crpi-kf13onfj0v8f6jax.cn-shanghai.personal.cr.aliyuncs.com/qiantongkeji/qmodel-server-ce:1.0.1
|
||||
@@ -0,0 +1,252 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
qModel Model Platform(Open Source Edition)
|
||||
*
|
||||
License:
|
||||
Released under the Apache License, Version 2.0.
|
||||
You may use, modify, and distribute this software for commercial purposes
|
||||
under the terms of the License.
|
||||
*
|
||||
Special Notice:
|
||||
All derivative versions are strictly prohibited from modifying or removing
|
||||
the default system logo and copyright information.
|
||||
For brand customization, please apply for brand customization authorization via official channels.
|
||||
*
|
||||
More information: https://qmodel.qiantong.tech/business.html
|
||||
*
|
||||
============================================================================
|
||||
*
|
||||
版权所有 © 2026 江苏千桐科技有限公司
|
||||
qModel 模型平台(开源版)
|
||||
*
|
||||
许可协议:
|
||||
本项目基于 Apache License 2.0 开源协议发布,
|
||||
允许在遵守协议的前提下进行商用、修改和分发。
|
||||
*
|
||||
特别说明:
|
||||
所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
*
|
||||
更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
-->
|
||||
|
||||
<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">
|
||||
<parent>
|
||||
<artifactId>qModel</artifactId>
|
||||
<groupId>tech.qiantong</groupId>
|
||||
<version>1.0.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>qmodel-server-ce</artifactId>
|
||||
|
||||
<description>
|
||||
后台管理服务入口
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<!-- 系統模块 -->
|
||||
<dependency>
|
||||
<groupId>tech.qiantong</groupId>
|
||||
<artifactId>qmodel-module-system-biz</artifactId>
|
||||
<version>1.0.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 示例模块 -->
|
||||
<dependency>
|
||||
<groupId>tech.qiantong</groupId>
|
||||
<artifactId>qmodel-module-model-biz</artifactId>
|
||||
<version>1.0.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- spring-boot-devtools -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.codemonstur</groupId>
|
||||
<artifactId>embedded-redis</artifactId>
|
||||
<version>1.4.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- maven-compiler-plugin 配置 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<annotationProcessorPaths>
|
||||
<!-- 引入 mapstruct-processor -->
|
||||
<path>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>1.5.5.Final</version>
|
||||
</path>
|
||||
<!-- 引入 lombok-processor -->
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.36</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Spring Boot Maven 插件配置 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.5.15</version>
|
||||
<configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- 其他需要的插件配置,如 maven-war-plugin 等 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- docker 镜像打包 -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
|
||||
<executions>
|
||||
<!-- 1. 只打印 build 命令 -->
|
||||
<execution>
|
||||
<id>print-docker-build</id>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${docker.print.skip}</skip>
|
||||
<executable>cmd</executable>
|
||||
<workingDirectory>${project.basedir}</workingDirectory>
|
||||
<arguments>
|
||||
<argument>/c</argument>
|
||||
<argument>
|
||||
echo docker buildx build --load --no-cache -t ${docker.hub}/${docker.repo}:${docker.tag} ${project.basedir} --file=docker/Dockerfile
|
||||
</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<!-- 2. 只打印 push 命令 -->
|
||||
<execution>
|
||||
<id>print-docker-push</id>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${docker.print.skip}</skip>
|
||||
<executable>cmd</executable>
|
||||
<workingDirectory>${project.basedir}</workingDirectory>
|
||||
<arguments>
|
||||
<argument>/c</argument>
|
||||
<argument>
|
||||
echo docker buildx build --platform linux/amd64,linux/arm64 --no-cache --push -t ${docker.hub}/${docker.repo}:${docker.tag} ${project.basedir} --file=docker/Dockerfile
|
||||
</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<!-- 3. 真正执行 docker build(和 print-docker-build 完全一致) -->
|
||||
<execution>
|
||||
<id>docker-build</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${docker.build.skip}</skip>
|
||||
<executable>docker</executable>
|
||||
<workingDirectory>${project.basedir}</workingDirectory>
|
||||
<arguments>
|
||||
<argument>buildx</argument>
|
||||
<argument>build</argument>
|
||||
<argument>--load</argument>
|
||||
<argument>--no-cache</argument>
|
||||
<argument>-t</argument>
|
||||
<argument>${docker.hub}/${docker.repo}:${docker.tag}</argument>
|
||||
<argument>${project.basedir}</argument>
|
||||
<argument>--file=docker/Dockerfile</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<!-- 4. 真正执行 docker push(和 print-docker-push 完全一致) -->
|
||||
<execution>
|
||||
<id>docker-push</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${docker.push.skip}</skip>
|
||||
<executable>docker</executable>
|
||||
<workingDirectory>${project.basedir}</workingDirectory>
|
||||
<arguments>
|
||||
<argument>buildx</argument>
|
||||
<argument>build</argument>
|
||||
<argument>--platform</argument>
|
||||
<argument>linux/amd64,linux/arm64</argument>
|
||||
<argument>--no-cache</argument>
|
||||
<argument>--push</argument>
|
||||
<argument>-t</argument>
|
||||
<argument>${docker.hub}/${docker.repo}:${docker.tag}</argument>
|
||||
<argument>${project.basedir}</argument>
|
||||
<argument>--file=docker/Dockerfile</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.server;
|
||||
|
||||
import org.dromara.easyes.starter.register.EsMapperScan;
|
||||
import org.dromara.x.file.storage.spring.EnableFileStorage;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||
|
||||
/**
|
||||
* 启动程序
|
||||
*
|
||||
* @author anivia
|
||||
*/
|
||||
@EnableFileStorage
|
||||
@EsMapperScan("tech.qiantong.**.esmapper")
|
||||
@ComponentScan(basePackages = {"tech.qiantong"})
|
||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||
@EnableAspectJAutoProxy(proxyTargetClass = true)
|
||||
public class QModelApplication {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
SpringApplication.run(QModelApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ qModel模型平台启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" __ __ _ _ \n" +
|
||||
" | \\/ | | | | |\n" +
|
||||
" __ _| \\ / | ___ __| | ___| |\n" +
|
||||
" / _` | |\\/| |/ _ \\ / _` |/ _ \\ |\n" +
|
||||
" | (_| | | | | (_) | (_| | __/ |\n" +
|
||||
" \\__, |_| |_|\\___/ \\__,_|\\___|_|\n" +
|
||||
" | | \n" +
|
||||
" |_| ");
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.server;
|
||||
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
|
||||
/**
|
||||
* web容器中进行部署
|
||||
*
|
||||
* @author anivia
|
||||
*/
|
||||
public class QModelServletInitializer extends SpringBootServletInitializer
|
||||
{
|
||||
@Override
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
|
||||
{
|
||||
return application.sources(QModelApplication.class);
|
||||
}
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.server.config;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import redis.embedded.RedisServer;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
import java.io.IOException;
|
||||
import java.net.ServerSocket;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 嵌入式 Redis实例配置,解决本地卡顿的问题
|
||||
* 仅供本地开发测试使用,注意!!!!
|
||||
* @author Ming
|
||||
*/
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class EmbeddedRedisConfig {
|
||||
|
||||
private RedisServer redisServer;
|
||||
|
||||
@Value("${spring.profiles.active}")
|
||||
private String active;
|
||||
|
||||
@PostConstruct
|
||||
public void startRedis() throws IOException, InterruptedException {
|
||||
if ("dev".equals(active)) {
|
||||
int redisPort = 12138;
|
||||
if (isPortAvailable(redisPort)) {
|
||||
redisServer = new RedisServer(redisPort);
|
||||
|
||||
// 打印开始信息
|
||||
log.info("-------------------------------------------------");
|
||||
log.info("| 注意: 仅供测试使用,生产环境误用!!! |");
|
||||
log.info("| 注意: 本地嵌入式 Redis Server 正在启动... |");
|
||||
log.info("-------------------------------------------------");
|
||||
|
||||
// 启动Redis服务器前的等待动画
|
||||
String[] frames = new String[]{"-", "\\", "|", "/"};
|
||||
for (int i = 0; i < 12; i++) {
|
||||
for (String frame : frames) {
|
||||
System.out.print("\r" + frame + " 启动中... 仅供开发和测试使用,请勿用于生产环境!");
|
||||
System.out.flush();
|
||||
TimeUnit.MILLISECONDS.sleep(50);
|
||||
}
|
||||
}
|
||||
|
||||
// 实际启动Redis服务器
|
||||
redisServer.start();
|
||||
|
||||
// 清除当前行并打印最终成功消息
|
||||
System.out.print("\r✓ 本地嵌入式 Redis Server 已成功启动于端口: " + redisServer.ports());
|
||||
System.out.println();
|
||||
log.info("-------------------------------------------------");
|
||||
log.info("| 成功: 本地嵌入式 Redis Server 已经启动完成。 |");
|
||||
log.info("| 端口: {} ", redisServer.ports());
|
||||
log.info("-------------------------------------------------");
|
||||
} else {
|
||||
log.warn("Redis 服务器端口 {} 已在使用中。跳过 Redis 启动。", redisPort);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查指定端口是否可用
|
||||
*
|
||||
* @param port 要检查的端口号
|
||||
* @return 如果端口未被占用返回true,否则返回false
|
||||
*/
|
||||
private boolean isPortAvailable(int port) {
|
||||
try (ServerSocket serverSocket = new ServerSocket(port)) {
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
public void stopRedis() throws IOException {
|
||||
if (redisServer != null) {
|
||||
redisServer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@Bean
|
||||
public RedisServer redisServer() {
|
||||
return redisServer;
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.server.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import tech.qiantong.qmodel.common.core.domain.AjaxResult;
|
||||
|
||||
|
||||
/**
|
||||
* 默认 Controller,解决部分 module 未开启时的 404 提示。
|
||||
* 例如说,/bpm/** 路径,工作流
|
||||
*
|
||||
* @author anivia
|
||||
*/
|
||||
@RestController
|
||||
public class DefaultController {
|
||||
|
||||
@RequestMapping({"/dev-api/example/**", "/prod-api/example/**", "/example/**"})
|
||||
public AjaxResult example404() {
|
||||
return AjaxResult.error("[示例模块 anivia-module-example - 已禁用]");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
# Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
# qModel Model Platform(Open Source Edition)
|
||||
# *
|
||||
# License:
|
||||
# Released under the Apache License, Version 2.0.
|
||||
# You may use, modify, and distribute this software for commercial purposes
|
||||
# under the terms of the License.
|
||||
# *
|
||||
# Special Notice:
|
||||
# All derivative versions are strictly prohibited from modifying or removing
|
||||
# the default system logo and copyright information.
|
||||
# For brand customization, please apply for brand customization authorization via official channels.
|
||||
# *
|
||||
# More information: https://qmodel.qiantong.tech/business.html
|
||||
# *
|
||||
# ============================================================================
|
||||
# *
|
||||
# 版权所有 © 2026 江苏千桐科技有限公司
|
||||
# qModel 模型平台(开源版)
|
||||
# *
|
||||
# 许可协议:
|
||||
# 本项目基于 Apache License 2.0 开源协议发布,
|
||||
# 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
# *
|
||||
# 特别说明:
|
||||
# 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
# 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
# *
|
||||
# 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
|
||||
restart.include.json=/com.alibaba.fastjson2.*.jar
|
||||
@@ -0,0 +1,147 @@
|
||||
# 主数据源选择
|
||||
datasource:
|
||||
type: dm8
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: 127.0.0.1
|
||||
# 端口,默认为6379
|
||||
port: 12138
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码
|
||||
password:
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
|
||||
datasource:
|
||||
druid:
|
||||
stat-view-servlet:
|
||||
# 是否启用Druid的监控统计功能
|
||||
enabled: true
|
||||
# 访问Druid监控页面的用户名
|
||||
loginUsername: anivia
|
||||
# 访问Druid监控页面的密码
|
||||
loginPassword: 123456
|
||||
dynamic:
|
||||
druid:
|
||||
# 连接池初始化时创建的连接数量
|
||||
initial-size: 5
|
||||
# 连接池中最小空闲连接数
|
||||
min-idle: 5
|
||||
# 连接池中最大活动连接数
|
||||
maxActive: 20
|
||||
# 连接池等待连接的最长时间(毫秒)
|
||||
maxWait: 60000
|
||||
# 数据库连接超时时间(毫秒)
|
||||
connectTimeout: 30000
|
||||
# Socket超时时间(毫秒)
|
||||
socketTimeout: 60000
|
||||
# 空闲连接的检测周期(毫秒)
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# 最小空闲连接的存活时间(毫秒)
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
# 用于检测连接是否有效的SQL语句
|
||||
validationQuery: SELECT 1 FROM DUAL
|
||||
# 是否在空闲时检测连接的有效性
|
||||
testWhileIdle: true
|
||||
# 借用连接时是否测试连接的有效性
|
||||
testOnBorrow: false
|
||||
# 归还连接时是否测试连接的有效性
|
||||
testOnReturn: false
|
||||
# 是否打开连接池的PreparedStatement缓存
|
||||
poolPreparedStatements: true
|
||||
# 每个连接池的PreparedStatement缓存上限
|
||||
maxPoolPreparedStatementPerConnectionSize: 20
|
||||
# 配置Druid的过滤器
|
||||
filters: stat,slf4j
|
||||
# Druid连接属性配置
|
||||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
datasource:
|
||||
# 主库数据源配置
|
||||
master:
|
||||
# 动态加载的配置属性
|
||||
driver-class-name: ${${datasource.type}.driver-class-name}
|
||||
url: ${${datasource.type}.url}
|
||||
username: ${${datasource.type}.username}
|
||||
password: ${${datasource.type}.password}
|
||||
# test:
|
||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||
# url: jdbc:dm://127.0.0.1:5236/MOON?STU&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&schema=MOON&serverTimezone=Asia/Shanghai
|
||||
# username: MOON
|
||||
# password: 1234567890
|
||||
|
||||
# MySQL配置文件
|
||||
mysql:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:mysql://8.136.153.124:3306/anivia_plus_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# 主库用户名
|
||||
username: anivia_plus_dev
|
||||
# 主库密码
|
||||
password: anivia_plus_dev0213.
|
||||
|
||||
# 达梦配置文件
|
||||
dm8:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: dm.jdbc.driver.DmDriver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:dm://110.42.38.62:40013/QMODEL_DEV?STU&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&schema=QMODEL_DEV&serverTimezone=Asia/Shanghai
|
||||
# 主库用户名
|
||||
username: QMODEL_DEV
|
||||
# 主库密码
|
||||
password: 0Uj*_smk
|
||||
|
||||
# 人大金仓配置文件
|
||||
kingbase8:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: com.kingbase8.Driver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:kingbase8://127.0.0.1:54321/anivia_dev?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC¤tSchema=anivia
|
||||
# 主库用户名
|
||||
username: kingbase
|
||||
# 主库密码
|
||||
password: 123456
|
||||
|
||||
# Oracle12c 配置文件
|
||||
oracle:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: oracle.jdbc.OracleDriver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:oracle:thin:@127.0.0.1:1521:xe?oracle.jdbc.timezoneAsRegion=true&oracle.jdbc.defaultTimezone=Asia/Shanghai¤tSchema=ANIVIA
|
||||
# 主库用户名
|
||||
username: ANIVIA
|
||||
# 主库密码
|
||||
password: ANIVIA
|
||||
|
||||
## 工作流模块的访问地址
|
||||
flow:
|
||||
enable: false
|
||||
url: http://127.0.0.1:26859/
|
||||
|
||||
|
||||
#模型
|
||||
modelUrl: "http://192.168.200.206:8000"
|
||||
|
||||
modelUrl2: "http://192.168.200.182:8821"
|
||||
|
||||
model:
|
||||
hydrodynamicModel: D:\model\chengxuhuizong11.5
|
||||
newHydrodynamicModel: C:\Users\yuexin\Downloads\1.31exe\1.31exe
|
||||
filePath: D:\nami\data\model
|
||||
location: D:\nami\data\modelFile\
|
||||
accessUrl: D:/nami/data/modelFile
|
||||
@@ -0,0 +1,146 @@
|
||||
# 主数据源选择
|
||||
datasource:
|
||||
type: dm8
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: 127.0.0.1
|
||||
# 端口,默认为6379
|
||||
port: 12138
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码
|
||||
password:
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
|
||||
datasource:
|
||||
druid:
|
||||
stat-view-servlet:
|
||||
# 是否启用Druid的监控统计功能
|
||||
enabled: true
|
||||
# 访问Druid监控页面的用户名
|
||||
loginUsername: anivia
|
||||
# 访问Druid监控页面的密码
|
||||
loginPassword: 123456
|
||||
dynamic:
|
||||
druid:
|
||||
# 连接池初始化时创建的连接数量
|
||||
initial-size: 5
|
||||
# 连接池中最小空闲连接数
|
||||
min-idle: 5
|
||||
# 连接池中最大活动连接数
|
||||
maxActive: 20
|
||||
# 连接池等待连接的最长时间(毫秒)
|
||||
maxWait: 60000
|
||||
# 数据库连接超时时间(毫秒)
|
||||
connectTimeout: 30000
|
||||
# Socket超时时间(毫秒)
|
||||
socketTimeout: 60000
|
||||
# 空闲连接的检测周期(毫秒)
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# 最小空闲连接的存活时间(毫秒)
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
# 用于检测连接是否有效的SQL语句
|
||||
validationQuery: SELECT 1 FROM DUAL
|
||||
# 是否在空闲时检测连接的有效性
|
||||
testWhileIdle: true
|
||||
# 借用连接时是否测试连接的有效性
|
||||
testOnBorrow: false
|
||||
# 归还连接时是否测试连接的有效性
|
||||
testOnReturn: false
|
||||
# 是否打开连接池的PreparedStatement缓存
|
||||
poolPreparedStatements: true
|
||||
# 每个连接池的PreparedStatement缓存上限
|
||||
maxPoolPreparedStatementPerConnectionSize: 20
|
||||
# 配置Druid的过滤器
|
||||
filters: stat,slf4j
|
||||
# Druid连接属性配置
|
||||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
datasource:
|
||||
# 主库数据源配置
|
||||
master:
|
||||
# 动态加载的配置属性
|
||||
driver-class-name: ${${datasource.type}.driver-class-name}
|
||||
url: ${${datasource.type}.url}
|
||||
username: ${${datasource.type}.username}
|
||||
password: ${${datasource.type}.password}
|
||||
# test:
|
||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||
# url: jdbc:dm://127.0.0.1:5236/MOON?STU&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&schema=MOON&serverTimezone=Asia/Shanghai
|
||||
# username: MOON
|
||||
# password: 1234567890
|
||||
|
||||
# MySQL配置文件
|
||||
mysql:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:mysql://8.136.153.124:3306/anivia_plus_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# 主库用户名
|
||||
username: anivia_plus_dev
|
||||
# 主库密码
|
||||
password: anivia_plus_dev0213.
|
||||
|
||||
# 达梦配置文件
|
||||
dm8:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: dm.jdbc.driver.DmDriver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:dm://110.42.38.62:40013/QMODEL_DEV?STU&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&schema=QMODEL_DEV&serverTimezone=Asia/Shanghai
|
||||
# 主库用户名
|
||||
username: QMODEL_DEV
|
||||
# 主库密码
|
||||
password: 0Uj*_smk
|
||||
|
||||
# 人大金仓配置文件
|
||||
kingbase8:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: com.kingbase8.Driver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:kingbase8://127.0.0.1:54321/anivia_dev?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC¤tSchema=anivia
|
||||
# 主库用户名
|
||||
username: kingbase
|
||||
# 主库密码
|
||||
password: 123456
|
||||
|
||||
# Oracle12c 配置文件
|
||||
oracle:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: oracle.jdbc.OracleDriver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:oracle:thin:@127.0.0.1:1521:xe?oracle.jdbc.timezoneAsRegion=true&oracle.jdbc.defaultTimezone=Asia/Shanghai¤tSchema=ANIVIA
|
||||
# 主库用户名
|
||||
username: ANIVIA
|
||||
# 主库密码
|
||||
password: ANIVIA
|
||||
|
||||
## 工作流模块的访问地址
|
||||
flow:
|
||||
enable: false
|
||||
url: http://127.0.0.1:26859/
|
||||
|
||||
|
||||
#模型
|
||||
modelUrl: "http://192.168.200.206:8000"
|
||||
modelUrl2: "http://192.168.200.182:8821"
|
||||
|
||||
model:
|
||||
hydrodynamicModel: D:\model\chengxuhuizong11.5
|
||||
newHydrodynamicModel: C:\Users\yuexin\Downloads\1.31exe\1.31exe
|
||||
filePath: D:\nami\data\model
|
||||
location: D:\nami\data\modelFile\
|
||||
accessUrl: D:/nami/data/modelFile
|
||||
@@ -0,0 +1,166 @@
|
||||
# Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
# qModel Model Platform(Open Source Edition)
|
||||
# *
|
||||
# License:
|
||||
# Released under the Apache License, Version 2.0.
|
||||
# You may use, modify, and distribute this software for commercial purposes
|
||||
# under the terms of the License.
|
||||
# *
|
||||
# Special Notice:
|
||||
# All derivative versions are strictly prohibited from modifying or removing
|
||||
# the default system logo and copyright information.
|
||||
# For brand customization, please apply for brand customization authorization via official channels.
|
||||
# *
|
||||
# More information: https://qmodel.qiantong.tech/business.html
|
||||
# *
|
||||
# ============================================================================
|
||||
# *
|
||||
# 版权所有 © 2026 江苏千桐科技有限公司
|
||||
# qModel 模型平台(开源版)
|
||||
# *
|
||||
# 许可协议:
|
||||
# 本项目基于 Apache License 2.0 开源协议发布,
|
||||
# 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
# *
|
||||
# 特别说明:
|
||||
# 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
# 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
# *
|
||||
# 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
|
||||
# 主数据源选择
|
||||
datasource:
|
||||
type: dm8
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: 127.0.0.1
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 13
|
||||
# 密码
|
||||
password: J98%FHF#9h@e88h9fre0
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
|
||||
datasource:
|
||||
druid:
|
||||
stat-view-servlet:
|
||||
# 是否启用Druid的监控统计功能
|
||||
enabled: true
|
||||
# 访问Druid监控页面的用户名
|
||||
loginUsername: anivia
|
||||
# 访问Druid监控页面的密码
|
||||
loginPassword: 123456
|
||||
dynamic:
|
||||
druid:
|
||||
# 连接池初始化时创建的连接数量
|
||||
initial-size: 5
|
||||
# 连接池中最小空闲连接数
|
||||
min-idle: 5
|
||||
# 连接池中最大活动连接数
|
||||
maxActive: 20
|
||||
# 连接池等待连接的最长时间(毫秒)
|
||||
maxWait: 60000
|
||||
# 数据库连接超时时间(毫秒)
|
||||
connectTimeout: 30000
|
||||
# Socket超时时间(毫秒)
|
||||
socketTimeout: 60000
|
||||
# 空闲连接的检测周期(毫秒)
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# 最小空闲连接的存活时间(毫秒)
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
# 用于检测连接是否有效的SQL语句
|
||||
validationQuery: SELECT 1 FROM DUAL
|
||||
# 是否在空闲时检测连接的有效性
|
||||
testWhileIdle: true
|
||||
# 借用连接时是否测试连接的有效性
|
||||
testOnBorrow: false
|
||||
# 归还连接时是否测试连接的有效性
|
||||
testOnReturn: false
|
||||
# 是否打开连接池的PreparedStatement缓存
|
||||
poolPreparedStatements: true
|
||||
# 每个连接池的PreparedStatement缓存上限
|
||||
maxPoolPreparedStatementPerConnectionSize: 20
|
||||
# 配置Druid的过滤器
|
||||
filters: stat,slf4j
|
||||
# Druid连接属性配置
|
||||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
datasource:
|
||||
# 主库数据源配置
|
||||
master:
|
||||
# 动态加载的配置属性
|
||||
driver-class-name: ${${datasource.type}.driver-class-name}
|
||||
url: ${${datasource.type}.url}
|
||||
username: ${${datasource.type}.username}
|
||||
password: ${${datasource.type}.password}
|
||||
# test:
|
||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||
# url: jdbc:dm://127.0.0.1:5236/MOON?STU&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&schema=MOON&serverTimezone=Asia/Shanghai
|
||||
# username: MOON
|
||||
# password: 1234567890
|
||||
|
||||
# 达梦配置文件
|
||||
dm8:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: dm.jdbc.driver.DmDriver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:dm://127.0.0.1:40013/QMODEL_DEV?STU&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&schema=QMODEL_DEV&serverTimezone=Asia/Shanghai
|
||||
# 主库用户名
|
||||
username:
|
||||
# 主库密码
|
||||
password:
|
||||
|
||||
# 人大金仓配置文件
|
||||
kingbase8:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: com.kingbase8.Driver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:kingbase8://127.0.0.1:54321/anivia_plus_dev?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC¤tSchema=anivia
|
||||
# 主库用户名
|
||||
username:
|
||||
# 主库密码
|
||||
password:
|
||||
|
||||
# Oracle12c 配置文件
|
||||
oracle:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: oracle.jdbc.OracleDriver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:oracle:thin:@127.0.0.1:1521:xe?oracle.jdbc.timezoneAsRegion=true&oracle.jdbc.defaultTimezone=Asia/Shanghai¤tSchema=ANIVIA
|
||||
# 主库用户名
|
||||
username:
|
||||
# 主库密码
|
||||
password:
|
||||
|
||||
## 工作流模块的访问地址
|
||||
flow:
|
||||
enable: false
|
||||
url: http://127.0.0.1:26859/
|
||||
|
||||
|
||||
|
||||
#模型
|
||||
modelUrl: "http://192.168.200.206:8000"
|
||||
modelUrl2: "http://192.168.200.182:8821"
|
||||
|
||||
model:
|
||||
hydrodynamicModel: D:\model\chengxuhuizong11.5
|
||||
newHydrodynamicModel: C:\Users\yuexin\Downloads\1.31exe\1.31exe
|
||||
filePath: D:\nami\data\model
|
||||
location: D:\nami\data\modelFile\
|
||||
accessUrl: D:/nami/data/modelFile
|
||||
@@ -0,0 +1,164 @@
|
||||
# Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
# qModel Model Platform(Open Source Edition)
|
||||
# *
|
||||
# License:
|
||||
# Released under the Apache License, Version 2.0.
|
||||
# You may use, modify, and distribute this software for commercial purposes
|
||||
# under the terms of the License.
|
||||
# *
|
||||
# Special Notice:
|
||||
# All derivative versions are strictly prohibited from modifying or removing
|
||||
# the default system logo and copyright information.
|
||||
# For brand customization, please apply for brand customization authorization via official channels.
|
||||
# *
|
||||
# More information: https://qmodel.qiantong.tech/business.html
|
||||
# *
|
||||
# ============================================================================
|
||||
# *
|
||||
# 版权所有 © 2026 江苏千桐科技有限公司
|
||||
# qModel 模型平台(开源版)
|
||||
# *
|
||||
# 许可协议:
|
||||
# 本项目基于 Apache License 2.0 开源协议发布,
|
||||
# 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
# *
|
||||
# 特别说明:
|
||||
# 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
# 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
# *
|
||||
# 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
|
||||
# 主数据源选择
|
||||
datasource:
|
||||
type: mysql
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: 127.0.0.1
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 2
|
||||
# 密码
|
||||
password: J98%FHF#9h@e88h9fre9
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
|
||||
datasource:
|
||||
druid:
|
||||
stat-view-servlet:
|
||||
# 是否启用Druid的监控统计功能
|
||||
enabled: true
|
||||
# 访问Druid监控页面的用户名
|
||||
loginUsername: anivia
|
||||
# 访问Druid监控页面的密码
|
||||
loginPassword: 123456
|
||||
dynamic:
|
||||
druid:
|
||||
# 连接池初始化时创建的连接数量
|
||||
initial-size: 5
|
||||
# 连接池中最小空闲连接数
|
||||
min-idle: 5
|
||||
# 连接池中最大活动连接数
|
||||
maxActive: 20
|
||||
# 连接池等待连接的最长时间(毫秒)
|
||||
maxWait: 60000
|
||||
# 数据库连接超时时间(毫秒)
|
||||
connectTimeout: 30000
|
||||
# Socket超时时间(毫秒)
|
||||
socketTimeout: 60000
|
||||
# 空闲连接的检测周期(毫秒)
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# 最小空闲连接的存活时间(毫秒)
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
# 用于检测连接是否有效的SQL语句
|
||||
validationQuery: SELECT 1 FROM DUAL
|
||||
# 是否在空闲时检测连接的有效性
|
||||
testWhileIdle: true
|
||||
# 借用连接时是否测试连接的有效性
|
||||
testOnBorrow: false
|
||||
# 归还连接时是否测试连接的有效性
|
||||
testOnReturn: false
|
||||
# 是否打开连接池的PreparedStatement缓存
|
||||
poolPreparedStatements: true
|
||||
# 每个连接池的PreparedStatement缓存上限
|
||||
maxPoolPreparedStatementPerConnectionSize: 20
|
||||
# 配置Druid的过滤器
|
||||
filters: stat,slf4j
|
||||
# Druid连接属性配置
|
||||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
datasource:
|
||||
# 主库数据源配置
|
||||
master:
|
||||
# 动态加载的配置属性
|
||||
driver-class-name: ${${datasource.type}.driver-class-name}
|
||||
url: ${${datasource.type}.url}
|
||||
username: ${${datasource.type}.username}
|
||||
password: ${${datasource.type}.password}
|
||||
# test:
|
||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||
# url: jdbc:dm://127.0.0.1:5236/MOON?STU&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&schema=MOON&serverTimezone=Asia/Shanghai
|
||||
# username: MOON
|
||||
# password: 1234567890
|
||||
|
||||
# MySQL配置文件
|
||||
mysql:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:mysql://127.0.0.1:3306/anivia_plus_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# 主库用户名
|
||||
username:
|
||||
# 主库密码
|
||||
password:
|
||||
|
||||
# 达梦配置文件
|
||||
dm8:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: dm.jdbc.driver.DmDriver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:dm://127.0.0.1:5236/ANIVIA?STU&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&schema=ANIVIA&serverTimezone=Asia/Shanghai
|
||||
# 主库用户名
|
||||
username:
|
||||
# 主库密码
|
||||
password:
|
||||
|
||||
# 人大金仓配置文件
|
||||
kingbase8:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: com.kingbase8.Driver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:kingbase8://127.0.0.1:54321/anivia_plus_dev?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC¤tSchema=anivia
|
||||
# 主库用户名
|
||||
username:
|
||||
# 主库密码
|
||||
password:
|
||||
|
||||
# Oracle12c 配置文件
|
||||
oracle:
|
||||
# JDBC驱动类名
|
||||
driver-class-name: oracle.jdbc.OracleDriver
|
||||
# 主库JDBC连接URL
|
||||
url: jdbc:oracle:thin:@127.0.0.1:1521:xe?oracle.jdbc.timezoneAsRegion=true&oracle.jdbc.defaultTimezone=Asia/Shanghai¤tSchema=ANIVIA
|
||||
# 主库用户名
|
||||
username:
|
||||
# 主库密码
|
||||
password:
|
||||
|
||||
## 工作流模块的访问地址
|
||||
flow:
|
||||
enable: false
|
||||
url: http://127.0.0.1:26859/
|
||||
@@ -0,0 +1,250 @@
|
||||
# Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
# qModel Model Platform(Open Source Edition)
|
||||
# *
|
||||
# License:
|
||||
# Released under the Apache License, Version 2.0.
|
||||
# You may use, modify, and distribute this software for commercial purposes
|
||||
# under the terms of the License.
|
||||
# *
|
||||
# Special Notice:
|
||||
# All derivative versions are strictly prohibited from modifying or removing
|
||||
# the default system logo and copyright information.
|
||||
# For brand customization, please apply for brand customization authorization via official channels.
|
||||
# *
|
||||
# More information: https://qmodel.qiantong.tech/business.html
|
||||
# *
|
||||
# ============================================================================
|
||||
# *
|
||||
# 版权所有 © 2026 江苏千桐科技有限公司
|
||||
# qModel 模型平台(开源版)
|
||||
# *
|
||||
# 许可协议:
|
||||
# 本项目基于 Apache License 2.0 开源协议发布,
|
||||
# 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
# *
|
||||
# 特别说明:
|
||||
# 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
# 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
# *
|
||||
# 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
|
||||
# 项目相关配置
|
||||
qmodel:
|
||||
# 名称
|
||||
name: qModel
|
||||
# 版本
|
||||
version: 1.0.1
|
||||
# 版权年份
|
||||
copyrightYear: 2024
|
||||
# 文件路径 示例( Windows配置D:/anivia/uploadPath,Linux配置 /home/anivia/uploadPath) -- 需要和 file 模块保持一致
|
||||
profile: ${user.dir}/upload/
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
# 验证码类型 math 数字计算 char 字符验证
|
||||
captchaType: math
|
||||
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8090
|
||||
port: 8090
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
tomcat:
|
||||
# tomcat的URI编码
|
||||
uri-encoding: UTF-8
|
||||
# 连接数满后的排队数,默认为100
|
||||
accept-count: 1000
|
||||
threads:
|
||||
# tomcat最大线程数,默认为200
|
||||
max: 800
|
||||
# Tomcat启动初始化的线程数,默认值10
|
||||
min-spare: 100
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
tech.qiantong: debug
|
||||
org.springframework: warn
|
||||
|
||||
# 用户配置
|
||||
user:
|
||||
password:
|
||||
# 密码最大错误次数
|
||||
maxRetryCount: 5
|
||||
# 密码锁定时间(默认10分钟)
|
||||
lockTime: 10
|
||||
#万能密码 配置为空则不生效
|
||||
universalPassword: gfh78h23789#$gfdy845
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
cache:
|
||||
type: jcache
|
||||
jcache:
|
||||
config: classpath:ehcache.xml
|
||||
thymeleaf:
|
||||
prefix: classpath:/dist/
|
||||
mode: HTML
|
||||
encoding: utf-8
|
||||
cache: false
|
||||
# 资源信息
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
profiles:
|
||||
active: dev # 默认激活的环境,可以在启动时覆盖
|
||||
config:
|
||||
import:
|
||||
- "application-${spring.profiles.active}.yml"
|
||||
# - "classpath:application-auth-${spring.profiles.active}.yml"
|
||||
- "classpath:application-es-${spring.profiles.active}.yml"
|
||||
- "classpath:application-file-${spring.profiles.active}.yml"
|
||||
# - "classpath:application-pay-${spring.profiles.active}.yml"
|
||||
# 示意:引入业务模块配置文件(请按照项目情况调整)
|
||||
- "classpath:application-system-${spring.profiles.active}.yml"
|
||||
- "classpath:application-example-${spring.profiles.active}.yml"
|
||||
# 文件上传
|
||||
servlet:
|
||||
multipart:
|
||||
# 单个文件大小
|
||||
max-file-size: 3000MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 3000MB
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
# 热部署开关
|
||||
enabled: true
|
||||
|
||||
# token配置
|
||||
token:
|
||||
# 令牌自定义标识
|
||||
header: Authorization
|
||||
# 令牌密钥
|
||||
secret: abcdefghijklmnopqrstuvwxyz
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 600
|
||||
|
||||
# MyBatis配置
|
||||
# mybatis:
|
||||
# 搜索指定包别名
|
||||
# typeAliasesPackage: tech.qiantong.**.domain
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
# mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
# configLocation: classpath:mybatis/mybatis-config.xml
|
||||
|
||||
# MyBatis Plus配置
|
||||
mybatis-plus:
|
||||
# 搜索指定包别名
|
||||
typeAliasesPackage: tech.qiantong.**.dataobject, tech.qiantong.**.domain
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
global-config:
|
||||
# 关闭 MyBatis-Plus 的 Banner
|
||||
banner: false
|
||||
db-config:
|
||||
# 主键类型 AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
|
||||
idType: AUTO
|
||||
# 全局逻辑删除字段名
|
||||
logic-delete-field: delFlag
|
||||
# 逻辑已删除值(默认为1)
|
||||
logic-delete-value: 1
|
||||
# 逻辑未删除值(默认为0)
|
||||
logic-not-delete-value: 0
|
||||
# 字段验证策略之 insert,在 insert 的时候的字段验证策略 IGNORED 忽略 NOT_NULL 非NULL NOT_EMPTY 非空 DEFAULT 默认 NEVER 不加入 SQL
|
||||
insertStrategy: NOT_NULL
|
||||
# 字段验证策略之 update,在 update 的时候的字段验证策略
|
||||
updateStrategy: NOT_NULL
|
||||
# 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
|
||||
where-strategy: NOT_NULL
|
||||
|
||||
mybatis-plus-join:
|
||||
# 是否打印 mybatis plus join banner,默认true
|
||||
banner: false
|
||||
# 全局启用副表逻辑删除,默认true。关闭后关联查询不会加副表逻辑删除
|
||||
sub-table-logic: true
|
||||
# 拦截器MappedStatement缓存,默认 true
|
||||
ms-cache: true
|
||||
# 表别名(默认 t)
|
||||
table-alias: t
|
||||
# 副表逻辑删除条件的位置,支持 WHERE、ON,默认 ON
|
||||
logic-del-type: on
|
||||
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
helperDialect: mysql
|
||||
supportMethodsArguments: true
|
||||
params: count=countSql
|
||||
|
||||
# 防止XSS攻击
|
||||
xss:
|
||||
# 过滤开关
|
||||
enabled: true
|
||||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
# Swagger 分组配置
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
path: /swagger-ui.html
|
||||
tags-sorter: alpha
|
||||
operations-sorter: alpha
|
||||
api-docs:
|
||||
path: /v3/api-docs
|
||||
group-configs:
|
||||
- group: 'system'
|
||||
paths-to-match: '/**'
|
||||
packages-to-scan: tech.qiantong.qmodel.module.system.controller
|
||||
- group: 'example'
|
||||
paths-to-match: '/**'
|
||||
packages-to-scan: tech.qiantong.qmodel.module.example.controller
|
||||
- group: 'ai'
|
||||
paths-to-match: '/**'
|
||||
packages-to-scan: tech.qiantong.qmodel.module.ai.controller
|
||||
# Swagger 增强配置
|
||||
knife4j:
|
||||
enable: true
|
||||
documents:
|
||||
-
|
||||
group: 2.X版本
|
||||
name: 接口签名
|
||||
locations: classpath:sign/*
|
||||
setting:
|
||||
language: zh-CN
|
||||
enable-swagger-models: true
|
||||
enable-document-manage: true
|
||||
swagger-model-name: 实体类列表
|
||||
enable-version: false
|
||||
enable-reload-cache-parameter: false
|
||||
enable-after-script: true
|
||||
enable-filter-multipart-api-method-type: POST
|
||||
enable-filter-multipart-apis: false
|
||||
enable-request-cache: true
|
||||
enable-host: false
|
||||
enable-host-text: 127.0.0.1:8080
|
||||
enable-home-custom: true
|
||||
home-custom-path: classpath:markdown/home.md
|
||||
enable-search: false
|
||||
enable-footer: false
|
||||
enable-footer-custom: true
|
||||
footer-custom-content: Apache License 2.0 | Copyright 2024-[江苏千桐科技有限公司])
|
||||
enable-dynamic-parameter: false
|
||||
enable-debug: true
|
||||
enable-open-api: true
|
||||
enable-group: true
|
||||
cors: false
|
||||
production: false
|
||||
basic:
|
||||
enable: true
|
||||
username: test
|
||||
password: 12313
|
||||
|
||||
## 工作流模块的访问地址
|
||||
flyflow:
|
||||
url: http://127.0.0.1:26859/
|
||||
@@ -0,0 +1,8 @@
|
||||
Application Version: ${qmodel.version}
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
_ _ _ _ _
|
||||
__ _(_) __ _ _ __ | |_ ___ _ __ __ _| | _____ (_|_)
|
||||
/ _` | |/ _` | '_ \| __/ _ \| '_ \ / _` | |/ / _ \| | |
|
||||
| (_| | | (_| | | | | || (_) | | | | (_| | < __/| | |
|
||||
\__, |_|\__,_|_| |_|\__\___/|_| |_|\__, |_|\_\___|/ |_|
|
||||
|_| |___/ |__/
|
||||
@@ -0,0 +1,111 @@
|
||||
<!--
|
||||
Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
qModel Model Platform(Open Source Edition)
|
||||
*
|
||||
License:
|
||||
Released under the Apache License, Version 2.0.
|
||||
You may use, modify, and distribute this software for commercial purposes
|
||||
under the terms of the License.
|
||||
*
|
||||
Special Notice:
|
||||
All derivative versions are strictly prohibited from modifying or removing
|
||||
the default system logo and copyright information.
|
||||
For brand customization, please apply for brand customization authorization via official channels.
|
||||
*
|
||||
More information: https://qmodel.qiantong.tech/business.html
|
||||
*
|
||||
============================================================================
|
||||
*
|
||||
版权所有 © 2026 江苏千桐科技有限公司
|
||||
qModel 模型平台(开源版)
|
||||
*
|
||||
许可协议:
|
||||
本项目基于 Apache License 2.0 开源协议发布,
|
||||
允许在遵守协议的前提下进行商用、修改和分发。
|
||||
*
|
||||
特别说明:
|
||||
所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
*
|
||||
更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://www.ehcache.org/v3"
|
||||
xsi:schemaLocation="http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core-3.0.xsd">
|
||||
|
||||
<!-- 缓存持久化配置: 定义磁盘缓存位置 -->
|
||||
<!-- <persistence directory="D:/cache/system"/>-->
|
||||
|
||||
<!-- 缓存模板: 未填写缓存名时使用的默认缓存,同时也可被继承 -->
|
||||
<cache-template name="defaultCache">
|
||||
<expiry>
|
||||
<ttl unit="seconds">300</ttl> <!-- 默认过期时间:5分钟 -->
|
||||
</expiry>
|
||||
<resources>
|
||||
<!-- 堆内存最大条目数 -->
|
||||
<heap unit="entries">1000</heap>
|
||||
<!-- 堆外内存最大大小(MB) -->
|
||||
<!-- <offheap unit="MB">200</offheap>-->
|
||||
<!-- 可选:磁盘缓存大小 -->
|
||||
<!-- <disk unit="GB">1</disk>-->
|
||||
</resources>
|
||||
</cache-template>
|
||||
|
||||
<!-- 5分钟过期 -->
|
||||
<cache alias="cache5Minutes" uses-template="defaultCache">
|
||||
<expiry>
|
||||
<ttl unit="seconds">300</ttl>
|
||||
</expiry>
|
||||
</cache>
|
||||
|
||||
<!-- 10分钟过期 -->
|
||||
<cache alias="cache10Minutes" uses-template="defaultCache">
|
||||
<expiry>
|
||||
<ttl unit="seconds">600</ttl>
|
||||
</expiry>
|
||||
</cache>
|
||||
|
||||
<!-- 30分钟过期 -->
|
||||
<cache alias="cache30Minutes" uses-template="defaultCache">
|
||||
<expiry>
|
||||
<ttl unit="seconds">1800</ttl>
|
||||
</expiry>
|
||||
</cache>
|
||||
|
||||
<!-- 6小时过期 -->
|
||||
<cache alias="cache6Hours" uses-template="defaultCache">
|
||||
<expiry>
|
||||
<ttl unit="seconds">21600</ttl>
|
||||
</expiry>
|
||||
</cache>
|
||||
|
||||
<!-- 12小时过期 -->
|
||||
<cache alias="cache12Hours" uses-template="defaultCache">
|
||||
<expiry>
|
||||
<ttl unit="seconds">43200</ttl>
|
||||
</expiry>
|
||||
</cache>
|
||||
|
||||
<!-- 24小时过期 -->
|
||||
<cache alias="cache24Hours" uses-template="defaultCache">
|
||||
<expiry>
|
||||
<ttl unit="seconds">86400</ttl>
|
||||
</expiry>
|
||||
</cache>
|
||||
|
||||
<!-- 7天过期 -->
|
||||
<cache alias="cache7Days" uses-template="defaultCache">
|
||||
<expiry>
|
||||
<ttl unit="seconds">604800</ttl>
|
||||
</expiry>
|
||||
</cache>
|
||||
|
||||
<!-- 30天过期 -->
|
||||
<cache alias="cache30Days" uses-template="defaultCache">
|
||||
<expiry>
|
||||
<ttl unit="seconds">2592000</ttl>
|
||||
</expiry>
|
||||
</cache>
|
||||
|
||||
</config>
|
||||
@@ -0,0 +1,68 @@
|
||||
# Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
# qModel Model Platform(Open Source Edition)
|
||||
# *
|
||||
# License:
|
||||
# Released under the Apache License, Version 2.0.
|
||||
# You may use, modify, and distribute this software for commercial purposes
|
||||
# under the terms of the License.
|
||||
# *
|
||||
# Special Notice:
|
||||
# All derivative versions are strictly prohibited from modifying or removing
|
||||
# the default system logo and copyright information.
|
||||
# For brand customization, please apply for brand customization authorization via official channels.
|
||||
# *
|
||||
# More information: https://qmodel.qiantong.tech/business.html
|
||||
# *
|
||||
# ============================================================================
|
||||
# *
|
||||
# 版权所有 © 2026 江苏千桐科技有限公司
|
||||
# qModel 模型平台(开源版)
|
||||
# *
|
||||
# 许可协议:
|
||||
# 本项目基于 Apache License 2.0 开源协议发布,
|
||||
# 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
# *
|
||||
# 特别说明:
|
||||
# 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
# 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
# *
|
||||
# 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
|
||||
#错误消息
|
||||
not.null=* 必须填写
|
||||
user.jcaptcha.error=验证码错误
|
||||
user.jcaptcha.expire=验证码已失效
|
||||
user.not.exists=用户不存在/密码错误
|
||||
user.password.not.match=用户不存在/密码错误
|
||||
user.password.retry.limit.count=密码输入错误{0}次
|
||||
user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟
|
||||
user.password.delete=对不起,您的账号已被删除
|
||||
user.blocked=用户已封禁,请联系管理员
|
||||
role.blocked=角色已封禁,请联系管理员
|
||||
login.blocked=很遗憾,访问IP已被列入系统黑名单
|
||||
user.logout.success=退出成功
|
||||
|
||||
length.not.valid=长度必须在{min}到{max}个字符之间
|
||||
|
||||
user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
|
||||
user.password.not.valid=* 5-50个字符
|
||||
|
||||
user.email.not.valid=邮箱格式错误
|
||||
user.mobile.phone.number.not.valid=手机号格式错误
|
||||
user.login.success=登录成功
|
||||
user.register.success=注册成功
|
||||
user.notfound=请重新登录
|
||||
user.forcelogout=管理员强制退出,请重新登录
|
||||
user.unknown.error=未知错误,请重新登录
|
||||
|
||||
##文件上传消息
|
||||
upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
|
||||
upload.filename.exceed.length=上传的文件名最长{0}个字符
|
||||
|
||||
##权限
|
||||
no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
|
||||
@@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
qModel Model Platform(Open Source Edition)
|
||||
*
|
||||
License:
|
||||
Released under the Apache License, Version 2.0.
|
||||
You may use, modify, and distribute this software for commercial purposes
|
||||
under the terms of the License.
|
||||
*
|
||||
Special Notice:
|
||||
All derivative versions are strictly prohibited from modifying or removing
|
||||
the default system logo and copyright information.
|
||||
For brand customization, please apply for brand customization authorization via official channels.
|
||||
*
|
||||
More information: https://qmodel.qiantong.tech/business.html
|
||||
*
|
||||
============================================================================
|
||||
*
|
||||
版权所有 © 2026 江苏千桐科技有限公司
|
||||
qModel 模型平台(开源版)
|
||||
*
|
||||
许可协议:
|
||||
本项目基于 Apache License 2.0 开源协议发布,
|
||||
允许在遵守协议的前提下进行商用、修改和分发。
|
||||
*
|
||||
特别说明:
|
||||
所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
*
|
||||
更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>15</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>ACCEPT</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_warn" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/warn.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/warn.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>15</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>WARN</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>15</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 用户访问日志输出 -->
|
||||
<appender name="user" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/user.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 按天回滚 daily -->
|
||||
<fileNamePattern>${log.path}/user.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>10</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="tech.qiantong.qMes" level="info" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_warn" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
|
||||
<!--系统用户操作日志-->
|
||||
<logger name="user" level="info">
|
||||
<appender-ref ref="user"/>
|
||||
</logger>
|
||||
</configuration>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
qModel Model Platform(Open Source Edition)
|
||||
*
|
||||
License:
|
||||
Released under the Apache License, Version 2.0.
|
||||
You may use, modify, and distribute this software for commercial purposes
|
||||
under the terms of the License.
|
||||
*
|
||||
Special Notice:
|
||||
All derivative versions are strictly prohibited from modifying or removing
|
||||
the default system logo and copyright information.
|
||||
For brand customization, please apply for brand customization authorization via official channels.
|
||||
*
|
||||
More information: https://qmodel.qiantong.tech/business.html
|
||||
*
|
||||
============================================================================
|
||||
*
|
||||
版权所有 © 2026 江苏千桐科技有限公司
|
||||
qModel 模型平台(开源版)
|
||||
*
|
||||
许可协议:
|
||||
本项目基于 Apache License 2.0 开源协议发布,
|
||||
允许在遵守协议的前提下进行商用、修改和分发。
|
||||
*
|
||||
特别说明:
|
||||
所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
*
|
||||
更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
-->
|
||||
|
||||
<!DOCTYPE configuration
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
<!-- 全局参数 -->
|
||||
<settings>
|
||||
<!-- 使全局的映射器启用或禁用缓存 -->
|
||||
<setting name="cacheEnabled" value="true" />
|
||||
<!-- 允许JDBC 支持自动生成主键 -->
|
||||
<setting name="useGeneratedKeys" value="true" />
|
||||
<!-- 配置默认的执行器.SIMPLE就是普通执行器;REUSE执行器会重用预处理语句(prepared statements);BATCH执行器将重用语句并执行批量更新 -->
|
||||
<setting name="defaultExecutorType" value="SIMPLE" />
|
||||
<!-- 指定 MyBatis 所用日志的具体实现 -->
|
||||
<setting name="logImpl" value="SLF4J" />
|
||||
<!-- 使用驼峰命名法转换字段 -->
|
||||
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
|
||||
</settings>
|
||||
|
||||
</configuration>
|
||||
@@ -0,0 +1,52 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
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
|
||||
u2PtdVyfXt/5vDfdI1kaoJm0YXmNcq8=
|
||||
-----END PRIVATE KEY-----
|
||||
@@ -0,0 +1,14 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA7/564YLocS9U8qDYnyFw
|
||||
19YeoMeEqG2pW/hpLdQdoqZZYMTJH82L+R/4SVyWY2jrlxadd3GkuCsHJ51gQ6rr
|
||||
GJ9xX1pmgshnd+AqaQNe0zRwFcelOrevlXmfAYo6YSZSYYq3bFoP08OzW3I4uOlv
|
||||
Rzk9M+Ii+cBAEigzuTRUh4/6VmRzyIVzi7wyy3HHLp9byvGh49UxWqlRCWK3sbi+
|
||||
XqdsaPZrXpe4aPVtuCs3J0IJOwMcCh+wXKTKajJpTTe01NIfsiIOqQogpgCQcvdf
|
||||
iFh1L98MGVsWPY3WG92jdLaL5Md8zcMZvQz0lYBx1BWefgdM5MWi/n0oTUOt/kwk
|
||||
mDJcdyel2KJe5HzFdorqJmkhKRChNdFsweUn7wqDTL0xOxb70+wb5dtR3qb3yUN0
|
||||
/dw1FxcTMS7jPuw3fddEXk8aOj/nrlw2JeeCVfIp2OgY307SlA23wYPHjMNRwB4g
|
||||
xYIg5DdkldFMFA5BeyOXohKx/V04qJecC1G6FT/RaQWf+cr2pnwNtlDIEjBONHsv
|
||||
gvlj/pKrVyf4LQwwCTKAbs1CWJpeLZyzP7TvmP7L280pRYuqeaKRyAtAM7xnTKzU
|
||||
JUB9461LkdBehNE41LRW5Ohecbaet1JVKx1uLvRZ5wLx/MSvyy9frbCA+UoIfuuw
|
||||
MDbYq7p1sHOuHB+Rxqrrq/sCAwEAAQ==
|
||||
-----END PUBLIC KEY-----
|
||||
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.server;
|
||||
|
||||
import tech.qiantong.qmodel.es.model.example.Document;
|
||||
import tech.qiantong.qmodel.es.esmapper.example.DocumentMapper;
|
||||
import org.dromara.easyes.core.conditions.select.LambdaEsQueryWrapper;
|
||||
import org.dromara.easyes.core.conditions.update.LambdaEsUpdateWrapper;
|
||||
import org.dromara.easyes.core.kernel.EsWrappers;
|
||||
import org.junit.Assert;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import tech.qiantong.qmodel.server.*;
|
||||
|
||||
|
||||
/**
|
||||
* EaysEs集成测试
|
||||
**/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringBootTest(classes = QModelApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class EsTest {
|
||||
|
||||
@Resource
|
||||
private DocumentMapper documentMapper;
|
||||
|
||||
@Test
|
||||
public void testCreateIndex() {
|
||||
// 测试创建索引,框架会根据实体类及字段上加的自定义注解一键帮您生成索引 需确保索引托管模式处于manual手动挡(默认处于此模式),若为自动挡则会冲突
|
||||
boolean success = documentMapper.createIndex();
|
||||
Assertions.assertTrue(success);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInsert() {
|
||||
// 测试插入数据
|
||||
Document document = new Document();
|
||||
document.setId("1");
|
||||
document.setTitle("老汉");
|
||||
document.setContent("推*技术过硬");
|
||||
int successCount = documentMapper.insert(document);
|
||||
System.out.println(successCount);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSelect() {
|
||||
// 测试查询 写法和MP一样 可以用链式,也可以非链式 根据使用习惯灵活选择即可
|
||||
String title = "老汉";
|
||||
Document document = EsWrappers.lambdaChainQuery(documentMapper)
|
||||
.eq(Document::getTitle, title)
|
||||
.one();
|
||||
System.out.println(document);
|
||||
Assert.assertEquals(title,document.getTitle());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
// 测试更新 更新有两种情况 分别演示如下:
|
||||
// case1: 已知id, 根据id更新 (为了演示方便,此id是从上一步查询中复制过来的,实际业务可以自行查询)
|
||||
String id = "1";
|
||||
String title1 = "隔壁老王";
|
||||
Document document1 = new Document();
|
||||
document1.setId(id);
|
||||
document1.setTitle(title1);
|
||||
documentMapper.updateById(document1);
|
||||
|
||||
// case2: id未知, 根据条件更新
|
||||
LambdaEsUpdateWrapper<Document> wrapper = new LambdaEsUpdateWrapper<>();
|
||||
wrapper.eq(Document::getTitle,title1);
|
||||
Document document2 = new Document();
|
||||
document2.setTitle("隔壁老李");
|
||||
document2.setContent("推*技术过软");
|
||||
documentMapper.update(document2,wrapper);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDelete() {
|
||||
// 测试删除数据 删除有两种情况:根据id删或根据条件删
|
||||
// 鉴于根据id删过于简单,这里仅演示根据条件删,以老李的名义删,让老李心理平衡些
|
||||
LambdaEsQueryWrapper<Document> wrapper = new LambdaEsQueryWrapper<>();
|
||||
String title = "隔壁老李";
|
||||
wrapper.eq(Document::getTitle,title);
|
||||
int successCount = documentMapper.delete(wrapper);
|
||||
System.out.println(successCount);
|
||||
|
||||
// 删除索引
|
||||
documentMapper.deleteIndex("document1_1");
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.server;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* 一键修改包名
|
||||
* * @author anivia
|
||||
*/
|
||||
public class ProjectRenamer {
|
||||
public static void main(String[] args) {
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
|
||||
// 输入修改前的工程路径
|
||||
System.out.print("请输入修改前的工程路径: ");
|
||||
String originalDirectory = scanner.nextLine();
|
||||
|
||||
// 输入修改后的工程路径
|
||||
System.out.print("请输入修改后的工程路径: ");
|
||||
String newDirectory = scanner.nextLine();
|
||||
|
||||
// 输入修改前的工程名称
|
||||
System.out.print("请输入修改前的工程名称: ");
|
||||
String oldProjectName = scanner.nextLine().toLowerCase();
|
||||
|
||||
// 输入修改后的工程名称
|
||||
System.out.print("请输入修改后的工程名称: ");
|
||||
String newProjectName = scanner.nextLine().toLowerCase();
|
||||
|
||||
try {
|
||||
// 创建新的功能目录
|
||||
File newDir = new File(newDirectory);
|
||||
if (!newDir.exists()) {
|
||||
newDir.mkdirs(); // 创建新目录
|
||||
}
|
||||
|
||||
// 复制原工程内容到新目录并重命名
|
||||
copyAndRename(new File(originalDirectory), newDir, oldProjectName, newProjectName);
|
||||
// 替换文件内容中的原工程名称
|
||||
replaceInFiles(newDir, oldProjectName, newProjectName);
|
||||
|
||||
System.out.println("工程已成功从 " + originalDirectory + " 修改为 " + newDirectory);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
scanner.close();
|
||||
}
|
||||
}
|
||||
|
||||
private static void copyAndRename(File srcDir, File destDir, String oldName, String newName) throws IOException {
|
||||
if (srcDir.isDirectory()) {
|
||||
for (File file : srcDir.listFiles()) {
|
||||
File newFile = new File(destDir, file.getName().replace(oldName, newName));
|
||||
if (file.isDirectory()) {
|
||||
newFile.mkdirs();
|
||||
copyAndRename(file, newFile, oldName, newName);
|
||||
} else {
|
||||
Files.copy(file.toPath(), newFile.toPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void replaceInFiles(File dir, String oldString, String newString) throws IOException {
|
||||
File[] files = dir.listFiles();
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
if (file.isDirectory()) {
|
||||
replaceInFiles(file, oldString, newString);
|
||||
} else {
|
||||
Path path = Paths.get(file.getPath());
|
||||
String content = new String(Files.readAllBytes(path));
|
||||
// 替换包路径和工程名称
|
||||
content = content.replace(oldString, newString);
|
||||
Files.write(path, content.getBytes());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user