初始化项目
This commit is contained in:
10
xtools-app-gen/xtools-app-gen-boot/Dockerfile
Normal file
10
xtools-app-gen/xtools-app-gen-boot/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM registry.cn-hangzhou.aliyuncs.com/xujun-public/liberica-openjdk-rocky:25.0.1-11
|
||||
MAINTAINER org.xujun
|
||||
|
||||
ENV JVM_OPTS=""
|
||||
|
||||
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
|
||||
WORKDIR /data0/app
|
||||
COPY target/xtools-app-gen-boot-1.0.0.jar /data0/app/xtools-app-gen-boot.jar
|
||||
|
||||
ENTRYPOINT ["/bin/sh", "-c", "java ${JVM_OPTS} -jar /data0/app/xtools-app-gen-boot.jar"]
|
||||
65
xtools-app-gen/xtools-app-gen-boot/pom.xml
Normal file
65
xtools-app-gen/xtools-app-gen-boot/pom.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>org.xujun</groupId>
|
||||
<artifactId>xtools-app-gen</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<artifactId>xtools-app-gen-boot</artifactId>
|
||||
|
||||
<!-- 依赖 -->
|
||||
<dependencies>
|
||||
<!-- 项目模块 begin -->
|
||||
<dependency>
|
||||
<groupId>org.xujun</groupId>
|
||||
<artifactId>xtools-app-gen-biz</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xujun</groupId>
|
||||
<artifactId>xtools-app-sys-call</artifactId>
|
||||
</dependency>
|
||||
<!-- 项目模块 end -->
|
||||
|
||||
<!-- 可选模块 begin -->
|
||||
<!-- xtools-app-common-sentinel -->
|
||||
<dependency>
|
||||
<groupId>org.xujun</groupId>
|
||||
<artifactId>xtools-app-common-sentinel</artifactId>
|
||||
</dependency>
|
||||
<!-- xtools-app-monitor-client -->
|
||||
<dependency>
|
||||
<groupId>org.xujun</groupId>
|
||||
<artifactId>xtools-app-monitor-client</artifactId>
|
||||
</dependency>
|
||||
<!-- 可选模块 end -->
|
||||
|
||||
<!-- xtools-cloud-alibaba-nacos -->
|
||||
<dependency>
|
||||
<groupId>org.xujun</groupId>
|
||||
<artifactId>xtools-cloud-alibaba-nacos</artifactId>
|
||||
</dependency>
|
||||
<!-- xtools-cloud-alibaba-sentinel -->
|
||||
<dependency>
|
||||
<groupId>org.xujun</groupId>
|
||||
<artifactId>xtools-cloud-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- 构建 -->
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.cyclonedx</groupId>
|
||||
<artifactId>cyclonedx-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,45 @@
|
||||
package xtools.app;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.util.StopWatch;
|
||||
import xtools.boot.core.utils.AppUtils;
|
||||
|
||||
/**
|
||||
* <p>Title : GenApplication</p>
|
||||
* <p>Description : GenApplication</p>
|
||||
* <p>DevelopTools : Idea_x64_v2026.1</p>
|
||||
* <p>DevelopSystem : macOS Sequoia 15.7.5</p>
|
||||
* <p>Company : org.xujun</p>
|
||||
*
|
||||
* @author : XuJun
|
||||
* @version : 1.0.0
|
||||
* @date : 2026/01/17 12:30
|
||||
*/
|
||||
@Slf4j
|
||||
@SpringBootApplication
|
||||
public class GenApplication {
|
||||
|
||||
/**
|
||||
* Main
|
||||
*
|
||||
* @param args 参数
|
||||
*/
|
||||
static void main(String[] args) {
|
||||
StopWatch sw = new StopWatch();
|
||||
sw.start();
|
||||
runApp(args);
|
||||
sw.stop();
|
||||
log.info(AppUtils.info(sw.getTotalTimeMillis()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 运行 App
|
||||
*
|
||||
* @param args 参数
|
||||
*/
|
||||
public static void runApp(String[] args) {
|
||||
SpringApplication.run(GenApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
# 代码生成器配置
|
||||
gen:
|
||||
# 下载代码文件名称
|
||||
downloadFileName: xtools-code.zip
|
||||
# 后端项目名称
|
||||
backendAppName: xtools-app
|
||||
# 前端项目名称
|
||||
frontendAppName: xtools-manager
|
||||
# 排除数据表
|
||||
excludeTables:
|
||||
- log
|
||||
# 默认配置
|
||||
defaultConfig:
|
||||
# 作者
|
||||
author: xujun
|
||||
# 版本
|
||||
version: 1.0.0
|
||||
# 模块名称
|
||||
moduleName: system
|
||||
# 过滤配置
|
||||
filterConfig:
|
||||
# 列注释过滤(正则)
|
||||
columnRemarks:
|
||||
- '\[.*?]'
|
||||
# 模板配置
|
||||
templateConfigs:
|
||||
TS_API:
|
||||
templatePath: gen/ts/api.ts.vm
|
||||
subPackageName: api
|
||||
extension: .ts
|
||||
VUE_VIEW:
|
||||
templatePath: gen/vue/index.vue.vm
|
||||
subPackageName: view
|
||||
extension: .vue
|
||||
Api:
|
||||
templatePath: gen/api/api.java.vm
|
||||
subPackageName: api
|
||||
projectModule: api
|
||||
Call:
|
||||
templatePath: gen/call/call.java.vm
|
||||
subPackageName: call
|
||||
projectModule: call
|
||||
Controller:
|
||||
templatePath: gen/controller/controller.java.vm
|
||||
subPackageName: controller
|
||||
Convert:
|
||||
templatePath: gen/convert/convert.java.vm
|
||||
subPackageName: convert
|
||||
BaseService:
|
||||
templatePath: gen/service/serviceBase.java.vm
|
||||
subPackageName: service.base
|
||||
Service:
|
||||
templatePath: gen/service/service.java.vm
|
||||
subPackageName: service
|
||||
ServiceImpl:
|
||||
templatePath: gen/service/serviceImpl.java.vm
|
||||
subPackageName: service.impl
|
||||
Mapper:
|
||||
templatePath: gen/mapper/mapper.java.vm
|
||||
subPackageName: mapper
|
||||
Entity:
|
||||
templatePath: gen/model/entity/entity.java.vm
|
||||
subPackageName: model.entity
|
||||
PageReq:
|
||||
templatePath: gen/model/dto/pageReq.java.vm
|
||||
subPackageName: model.dto.req
|
||||
AddReq:
|
||||
templatePath: gen/model/dto/addReq.java.vm
|
||||
subPackageName: model.dto.req
|
||||
UpdateReq:
|
||||
templatePath: gen/model/dto/updateReq.java.vm
|
||||
subPackageName: model.dto.req
|
||||
Resp:
|
||||
templatePath: gen/model/dto/resp.java.vm
|
||||
subPackageName: model.dto.resp
|
||||
Excel:
|
||||
templatePath: gen/model/dto/excel.java.vm
|
||||
subPackageName: model.dto.excel
|
||||
Sql:
|
||||
templatePath: gen/sql/db.sql.vm
|
||||
subPackageName:
|
||||
extension: .sql
|
||||
@@ -0,0 +1,45 @@
|
||||
# Spring 信息
|
||||
spring:
|
||||
cloud:
|
||||
# Nacos 配置信息
|
||||
nacos:
|
||||
# Nacos 发现配置信息
|
||||
discovery:
|
||||
# Nacos 发现服务器地址
|
||||
server-addr: ${NACOS_SERVICE_HOST:127.0.0.1}:${NACOS_SERVICE_PORT:8848}
|
||||
# Nacos 发现服务器用户名
|
||||
username: ${NACOS_SERVICE_USERNAME:nacos}
|
||||
# Nacos 发现服务器密码
|
||||
password: ${NACOS_SERVICE_PASSWORD:nacos}
|
||||
# Nacos 发现服务器命名空间(默认为Public),可以省略不写
|
||||
namespace: ${NACOS_DISCOVERY_NAMESPACE:xtools-cloud}
|
||||
# 仅ipv4模式
|
||||
ip-type: IPv4
|
||||
# Nacos 配置中心信息
|
||||
config:
|
||||
# Nacos 配置服务器地址
|
||||
server-addr: ${NACOS_SERVICE_HOST:127.0.0.1}:${NACOS_SERVICE_PORT:8848}
|
||||
# Nacos 配置服务器用户名
|
||||
username: ${NACOS_SERVICE_USERNAME:nacos}
|
||||
# Nacos 配置服务器密码
|
||||
password: ${NACOS_SERVICE_PASSWORD:nacos}
|
||||
# Nacos 配置服务器命名空间(默认为Public),可以省略不写
|
||||
namespace: ${NACOS_CONFIG_NAMESPACE:xtools-cloud}
|
||||
# 配置文件
|
||||
config:
|
||||
import:
|
||||
# Boot配置文件
|
||||
- nacos:application-boot-base.yaml?refreshEnabled=true&group=BOOT
|
||||
- nacos:application-boot-db.yaml?refreshEnabled=true&group=BOOT
|
||||
- nacos:application-boot-druid.yaml?refreshEnabled=true&group=BOOT
|
||||
- nacos:application-boot-knife4j.yaml?refreshEnabled=true&group=BOOT
|
||||
- nacos:application-boot-log.yaml?refreshEnabled=true&group=BOOT
|
||||
- nacos:application-boot-mybatis-plus.yaml?refreshEnabled=true&group=BOOT
|
||||
- nacos:application-boot-monitor.yaml?refreshEnabled=true&group=BOOT
|
||||
- nacos:application-boot-rabbitmq.yaml?refreshEnabled=true&group=BOOT
|
||||
- nacos:application-boot-redis.yaml?refreshEnabled=true&group=BOOT
|
||||
# Cloud配置文件
|
||||
- nacos:application-cloud-sentinel.yaml?refreshEnabled=true&group=CLOUD
|
||||
# Customizer配置文件
|
||||
- nacos:application-customizer-log.yaml?refreshEnabled=true&group=CUSTOMIZER
|
||||
# App配置文件
|
||||
@@ -0,0 +1,17 @@
|
||||
# Spring 配置
|
||||
spring:
|
||||
# 应用配置
|
||||
application:
|
||||
# 应用名称
|
||||
name: xtools-app-gen
|
||||
# 环境配置
|
||||
profiles:
|
||||
active:
|
||||
- info
|
||||
- nacos
|
||||
- app-gen
|
||||
|
||||
# 服务器配置
|
||||
server:
|
||||
# 端口
|
||||
port: ${GEN_SERVICE_PORT:18002}
|
||||
Reference in New Issue
Block a user