初始化项目
This commit is contained in:
10
xtools-app-sys/xtools-app-sys-boot/Dockerfile
Normal file
10
xtools-app-sys/xtools-app-sys-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-sys-boot-1.0.0.jar /data0/app/xtools-app-sys-boot.jar
|
||||
|
||||
ENTRYPOINT ["/bin/sh", "-c", "java ${JVM_OPTS} -jar /data0/app/xtools-app-sys-boot.jar"]
|
||||
84
xtools-app-sys/xtools-app-sys-boot/pom.xml
Normal file
84
xtools-app-sys/xtools-app-sys-boot/pom.xml
Normal file
@@ -0,0 +1,84 @@
|
||||
<?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-sys</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<artifactId>xtools-app-sys-boot</artifactId>
|
||||
|
||||
<!-- 依赖 -->
|
||||
<dependencies>
|
||||
<!-- 项目模块 begin -->
|
||||
<dependency>
|
||||
<groupId>org.xujun</groupId>
|
||||
<artifactId>xtools-app-sys-biz</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>
|
||||
<!-- xtools-boot-job-xxl -->
|
||||
<dependency>
|
||||
<groupId>org.xujun</groupId>
|
||||
<artifactId>xtools-boot-job-xxl</artifactId>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.xujun</groupId>-->
|
||||
<!-- <artifactId>xtools-app-sys-scheduled</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.xujun</groupId>
|
||||
<artifactId>xtools-app-sys-log-bus-elasticsearch</artifactId>
|
||||
</dependency>
|
||||
<!-- xtools-boot-storage-file -->
|
||||
<!--<dependency>-->
|
||||
<!-- <groupId>org.xujun</groupId>-->
|
||||
<!-- <artifactId>xtools-boot-storage-file</artifactId>-->
|
||||
<!--</dependency>-->
|
||||
<!-- xtools-boot-storage-s3 -->
|
||||
<dependency>
|
||||
<groupId>org.xujun</groupId>
|
||||
<artifactId>xtools-boot-storage-s3</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 : SysApplication</p>
|
||||
* <p>Description : SysApplication</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 SysApplication {
|
||||
|
||||
/**
|
||||
* 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(SysApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
# 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-elasticsearch.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-monitor.yaml?refreshEnabled=true&group=BOOT
|
||||
- nacos:application-boot-mybatis-plus.yaml?refreshEnabled=true&group=BOOT
|
||||
- nacos:application-boot-rabbitmq.yaml?refreshEnabled=true&group=BOOT
|
||||
- nacos:application-boot-redis.yaml?refreshEnabled=true&group=BOOT
|
||||
- nacos:application-boot-storage.yaml?refreshEnabled=true&group=BOOT
|
||||
- nacos:application-boot-xxl-job.yaml?refreshEnabled=true&group=BOOT
|
||||
# Cloud配置文件
|
||||
- nacos:application-cloud-sentinel.yaml?refreshEnabled=true&group=CLOUD
|
||||
# Customizer配置文件
|
||||
- nacos:application-customizer-api.yaml?refreshEnabled=true&group=CUSTOMIZER
|
||||
- nacos:application-customizer-log.yaml?refreshEnabled=true&group=CUSTOMIZER
|
||||
# App配置文件
|
||||
- nacos:application-app-sys.yaml?refreshEnabled=true&group=APP
|
||||
@@ -0,0 +1,16 @@
|
||||
# Spring 配置
|
||||
spring:
|
||||
# 应用配置
|
||||
application:
|
||||
# 应用名称
|
||||
name: xtools-app-sys
|
||||
# 环境配置
|
||||
profiles:
|
||||
active:
|
||||
- info
|
||||
- nacos
|
||||
|
||||
# 服务器配置
|
||||
server:
|
||||
# 端口
|
||||
port: ${SYS_SERVICE_PORT:18001}
|
||||
Reference in New Issue
Block a user