diff --git a/src/main/java/com/afe/ai/data/AiDataApplication.java b/src/main/java/com/afe/ai/data/AiDataApplication.java new file mode 100644 index 0000000..5111818 --- /dev/null +++ b/src/main/java/com/afe/ai/data/AiDataApplication.java @@ -0,0 +1,22 @@ +package com.afe.ai.data; + +import com.afe.ai.common.security.annotation.EnableRyFeignClients; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; + +/** + * @author ben.yang + * @description 数据中心 + * @date 2024/2/22 17:25 + */ +@EnableRyFeignClients +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class }) +public class AiDataApplication { + + public static void main(String[] args) + { + SpringApplication.run(AiDataApplication.class, args); + System.out.println("(♥◠‿◠)ノ゙ 数据中心启动成功 ლ(´ڡ`ლ)゙ "); + } +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..39c4e02 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,21 @@ +server: + port: 9209 + +spring: + application: + # 应用名称 + name: ai-data + messages: + # 默认 messages, 这里我们多了一层目录i18n + basename: i18n/messages + # 如果默认 false, 则会出现匹配不到就会跑异常(NoSuchMessageException)的情况 + use-code-as-default-message: true + # 是否总是应用MessageFormat规则,即使是没有参数的消息也要解析, 默认 false + always-use-message-format: false + jackson: + time-zone: GMT+8 + date-format: yyyy-MM-dd HH:mm:ss + default-property-inclusion: ALWAYS + +baffle: + enabled: true \ No newline at end of file diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt new file mode 100644 index 0000000..fd1bd4c --- /dev/null +++ b/src/main/resources/banner.txt @@ -0,0 +1,24 @@ +Spring Boot Version: ${spring-boot.version} +Spring Application Name: ${spring.application.name} +//////////////////////////////////////////////////////////////////// +// _ooOoo_ // +// o8888888o // +// 88" . "88 // +// (| ^_^ |) // +// O\ = /O // +// ____/`---'\____ // +// .' \\| |// `. // +// / \\||| : |||// \ // +// / _||||| -:- |||||- \ // +// | | \\\ - /// | | // +// | \_| ''\---/'' | | // +// \ .-\__ `-` ___/-. / // +// ___`. .' /--.--\ `. . ___ // +// ."" '< `.___\_<|>_/___.' >'"". // +// | | : `- \`.;`\ _ /`;.`/ - ` : | | // +// \ \ `-. \_ __\ /__ _/ .-` / / // +// ========`-.____`-.___\_____/___.-`____.-'======== // +// `=---=' // +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// 佛祖保佑 永不宕机 永无BUG // +//////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/src/main/resources/bootstrap.yml b/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..a4b27b3 --- /dev/null +++ b/src/main/resources/bootstrap.yml @@ -0,0 +1,102 @@ +# Nacos帮助文档: https://nacos.io/zh-cn/docs/concepts.html +# Nacos认证信息 +# 指定的配置 +spring: + profiles: + active: local + +--- +#默认环境(预生产部署环境) +spring: + config: + activate: + on-profile: pre-production + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: ai-nacos:8848 + config: + # 配置中心地址 + server-addr: ai-nacos:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application.${spring.cloud.nacos.config.file-extension} + +--- + +#默认环境(jenkins部署环境) +spring: + config: + activate: + on-profile: dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: ai-nacos:8848 + config: + # 配置中心地址 + server-addr: ai-nacos:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + +--- + +#localhost部署环境 +spring: + config: + activate: + on-profile: local + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 127.0.0.1:8848 + config: + # 配置中心地址 + server-addr: 127.0.0.1:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + + +--- +#使用的远程的nacos在本地跑 +spring: + config: + activate: + on-profile: remote_nacos + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 192.168.3.210:8848 + # # 命名空间 +# # 分组名称 +# group: LOCAL_GROUP + config: + # 配置中心地址 + server-addr: 192.168.3.210:8848 +# # 命名空间 + +# # 分组名称 +# group: LOCAL_GROUP + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + #- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + - application.${spring.cloud.nacos.config.file-extension} + + + + + diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..3b5db2b --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/target/classes/com/afe/ai/data/AiDataApplication.class b/target/classes/com/afe/ai/data/AiDataApplication.class new file mode 100644 index 0000000..8f4e0cb Binary files /dev/null and b/target/classes/com/afe/ai/data/AiDataApplication.class differ