feat: first commit

This commit is contained in:
Xiang
2026-01-04 14:32:21 +08:00
commit 9f10d1484e
8 changed files with 209 additions and 0 deletions

20
xservice-server/pom.xml Normal file
View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>com.xiang.app</groupId>
<artifactId>xservice-cornucopia</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>xservice-server</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@@ -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!");
}
}

View File

@@ -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

View File

@@ -0,0 +1,9 @@
spring:
profiles:
active: dev
application:
name: xservice-cornucopia
main:
allow-bean-definition-overriding: true
server:
port: 38020