初始化项目
This commit is contained in:
@@ -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