commit 9f10d1484e37057129272868f3629fdd3db0642f Author: Xiang Date: Sun Jan 4 14:32:21 2026 +0800 feat: first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..f27cdfa --- /dev/null +++ b/pom.xml @@ -0,0 +1,66 @@ + + + 4.0.0 + + + com.xiang.pom + xmc-web-starter + 1.0-SNAPSHOT + + + com.xiang.app + xservice-cornucopia + 1.0-SNAPSHOT + pom + + xservice-server + xservice-core + + + + 17 + 17 + UTF-8 + + + + + com.xiang.starter + xmc-common + 1.0-SNAPSHOT + + + com.xiang.starter + xmc-mysql-starter + 1.0-SNAPSHOT + + + com.xiang.starter + xmc-cache-starter + 1.0-SNAPSHOT + + + com.xiang.starter + xmc-http-starter + 1.0-SNAPSHOT + + + com.xiang.starter + xmc-message-starter + 1.0-SNAPSHOT + + + com.xiang.starter + xmc-quartz-starter + 1.0-SNAPSHOT + + + com.xiang.starter + xmc-logger-starter + 1.0-SNAPSHOT + + + + \ No newline at end of file diff --git a/xservice-core/pom.xml b/xservice-core/pom.xml new file mode 100644 index 0000000..ddefa5a --- /dev/null +++ b/xservice-core/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.xiang.app + xservice-cornucopia + 1.0-SNAPSHOT + + + xservice-core + + + 17 + 17 + UTF-8 + + + \ No newline at end of file diff --git a/xservice-server/pom.xml b/xservice-server/pom.xml new file mode 100644 index 0000000..d76176d --- /dev/null +++ b/xservice-server/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.xiang.app + xservice-cornucopia + 1.0-SNAPSHOT + + + xservice-server + + + 17 + 17 + UTF-8 + + + \ No newline at end of file diff --git a/xservice-server/src/main/java/com/xiang/app/Application.java b/xservice-server/src/main/java/com/xiang/app/Application.java new file mode 100644 index 0000000..e2d782f --- /dev/null +++ b/xservice-server/src/main/java/com/xiang/app/Application.java @@ -0,0 +1,25 @@ +package com.xiang.app; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.ConfigurationPropertiesScan; + +/** + * @Author: xiang + * @Date: 2026-01-04 14:20 + */ +@SpringBootApplication +@ConfigurationPropertiesScan(basePackages = { + "com.xiang.xservice.logger" +}) +public class Application { + + private static final Logger log = LoggerFactory.getLogger(Application.class); + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + log.info("cornucopia application start up success!"); + } +} \ No newline at end of file diff --git a/xservice-server/src/main/resources/application-dev.yml b/xservice-server/src/main/resources/application-dev.yml new file mode 100644 index 0000000..0fef7ef --- /dev/null +++ b/xservice-server/src/main/resources/application-dev.yml @@ -0,0 +1,31 @@ +spring: + cloud: + nacos: + discovery: + group: DEFAULT_GROUP + namespace: 00131110-3ecb-4a35-8bbb-624edde1d937 + server-addr: general.xiangtech.xyz:8848 + username: nacos + password: nacos + datasource: + dynamic: + primary: master + datasource: + master: + url: jdbc:mysql://120.27.153.87:3306/xservice-script-test?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true + username: root + password: sdkljfikdfn@123 + driver-class-name: com.mysql.cj.jdbc.Driver + sshConnect: false + redis: + host: r-bp1wt59a6nfyt4e3ltpd.redis.rds.aliyuncs.com + port: 6379 + password: Xiang0000 # 如果无密码可以省略 + database: 10 + timeout: 5000 + lettuce: + pool: + max-active: 8 + max-idle: 8 + min-idle: 0 + max-wait: 1000 \ No newline at end of file diff --git a/xservice-server/src/main/resources/application-prod.yml b/xservice-server/src/main/resources/application-prod.yml new file mode 100644 index 0000000..e69de29 diff --git a/xservice-server/src/main/resources/application.yml b/xservice-server/src/main/resources/application.yml new file mode 100644 index 0000000..59d2c5c --- /dev/null +++ b/xservice-server/src/main/resources/application.yml @@ -0,0 +1,9 @@ +spring: + profiles: + active: dev + application: + name: xservice-cornucopia + main: + allow-bean-definition-overriding: true +server: + port: 38020