commit e8ad051a80dd4c9982f44e5ea744c9604d2f3f50 Author: Derran Date: Wed Mar 13 11:40:58 2024 +0800 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..231022f --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/** +!**/src/test/** + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ + +### VS Code ### +.vscode/ +/logs +*.json diff --git a/dating-agency-mal-sdk/.gitignore b/dating-agency-mal-sdk/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/dating-agency-mal-sdk/.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/dating-agency-mal-sdk/pom.xml b/dating-agency-mal-sdk/pom.xml new file mode 100644 index 0000000..93718c0 --- /dev/null +++ b/dating-agency-mal-sdk/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.qniao + dating-agency-mall + 0.0.1-SNAPSHOT + + + dating-agency-mal-sdk + + + 8 + 8 + UTF-8 + + + \ No newline at end of file diff --git a/dating-agency-mall-constant/.gitignore b/dating-agency-mall-constant/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/dating-agency-mall-constant/.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/dating-agency-mall-constant/pom.xml b/dating-agency-mall-constant/pom.xml new file mode 100644 index 0000000..33ce483 --- /dev/null +++ b/dating-agency-mall-constant/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.qniao + dating-agency-mall + 0.0.1-SNAPSHOT + + + dating-agency-mall-constant + + + 8 + 8 + UTF-8 + + + \ No newline at end of file diff --git a/dating-agency-mall-entity/.gitignore b/dating-agency-mall-entity/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/dating-agency-mall-entity/.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/dating-agency-mall-entity/pom.xml b/dating-agency-mall-entity/pom.xml new file mode 100644 index 0000000..2928c88 --- /dev/null +++ b/dating-agency-mall-entity/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.qniao + dating-agency-mall + 0.0.1-SNAPSHOT + + + dating-agency-mall-entity + + + 8 + 8 + UTF-8 + + + \ No newline at end of file diff --git a/dating-agency-mall-event/.gitignore b/dating-agency-mall-event/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/dating-agency-mall-event/.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/dating-agency-mall-event/pom.xml b/dating-agency-mall-event/pom.xml new file mode 100644 index 0000000..daaf667 --- /dev/null +++ b/dating-agency-mall-event/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.qniao + dating-agency-mall + 0.0.1-SNAPSHOT + + + dating-agency-mall-event + + + 8 + 8 + UTF-8 + + + \ No newline at end of file diff --git a/dating-agency-mall-server/.gitignore b/dating-agency-mall-server/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/dating-agency-mall-server/.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/dating-agency-mall-server/pom.xml b/dating-agency-mall-server/pom.xml new file mode 100644 index 0000000..60b7207 --- /dev/null +++ b/dating-agency-mall-server/pom.xml @@ -0,0 +1,71 @@ + + + 4.0.0 + + com.qniao + dating-agency-mall + 0.0.1-SNAPSHOT + + + dating-agency-mall-server + + + 8 + 8 + UTF-8 + + + + + com.qniao + spring-boot-starter + + + com.qniao + spring-cloud-starter + + + org.springframework.boot + spring-boot-starter-test + test + + + com.qniao + mybatis-plus-starter + + + mysql + mysql-connector-java + runtime + + + com.ctrip.framework.apollo + apollo-client + + + com.qniao + common-utils + + + com.qniao + swagger-starter + + + com.qniao + redis-starter + + + + + dating-agency-mall-server + + + org.springframework.boot + spring-boot-maven-plugin + + + compile + + \ No newline at end of file diff --git a/dating-agency-mall-server/src/main/java/com/qniao/dam/server/MallServerApplication.java b/dating-agency-mall-server/src/main/java/com/qniao/dam/server/MallServerApplication.java new file mode 100644 index 0000000..4474192 --- /dev/null +++ b/dating-agency-mall-server/src/main/java/com/qniao/dam/server/MallServerApplication.java @@ -0,0 +1,21 @@ +package com.qniao.dam.server; + +import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.netflix.eureka.EnableEurekaClient; +import org.springframework.cloud.openfeign.EnableFeignClients; + +@SpringBootApplication(scanBasePackages = {"com.qniao"}) +@EnableEurekaClient +@MapperScan("com.qniao.**.dao.**") +@EnableFeignClients(basePackages = {"com.qniao"}) +@EnableApolloConfig +public class MallServerApplication { + + public static void main(String[] args) { + SpringApplication.run(MallServerApplication.class, args); + } + +} diff --git a/dating-agency-mall-server/src/main/resources/application.yml b/dating-agency-mall-server/src/main/resources/application.yml new file mode 100644 index 0000000..e31ba50 --- /dev/null +++ b/dating-agency-mall-server/src/main/resources/application.yml @@ -0,0 +1,93 @@ +server: + port: 6002 + servlet: + context-path: /dating-agency-mall + +spring: + application: + name: eureka-client-dating-agency-mall + description: 商城 + api-doc-enabled: ${swagger-on:true} + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + name: ${mysql-database-name} + url: jdbc:mysql://${mysql-database-url}/${mysql-database-name}?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useTimezone=true&serverTimezone=GMT%2B8&useSSL=false&allowMultiQueries=true + username: ${mysql-user-name} + password: ${mysql-user-password} + hikari: + minimum-idle: 3 + maximum-pool-size: 10 + max-lifetime: 30000 + connection-test-query: SELECT 1 + redis: + database: ${redis-database-index:0} + host: ${redis-host} + port: ${redis-port:6379} + password: ${redis-password} + timeout: 3000 + lettuce: + pool: + max-active: 200 + max-idle: 20 + min-idle: 10 + max-wait: -1 + servlet: + multipart: + enabled: true + max-file-size: 100MB + max-request-size: 105MB + +mybatis: + mapper-locations: classpath:mapping/*Mapper.xml + type-aliases-package: com.qniao.**.entity + +# mybatis-plus配置控制台打印完整带参数SQL语句 +mybatis-plus: + global-config: + db-config: + table-prefix: qn_ + logic-delete-field: isDelete # 全局逻辑删除的实体字段名 + logic-delete-value: 1 # 逻辑已删除值(默认为 1) + logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) + type-enums-package: com.qniao.**.constant + configuration: + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + +eureka: + client: + register-with-eureka: true + fetch-registry: ${eureka-enable:true} + service-url: + defaultZone: http://${register-eureka-url}/eureka/ + instance: + prefer-ip-address: true + instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}:${server.port} + lease-expiration-duration-in-seconds: 15 + lease-renewal-interval-in-seconds: 5 + +feign: + hystrix: + enabled: false + client: + config: + default: + connectTimeout: 10000 + readTimeout: 60000 + +# DefaultClientConfigImpl +ribbon: + ConnectTimeout: 8000 + ReadTimeout: 20000 + +# apollo +app: + id: dating-agency-mall + +snow-flake: + datacenter-id: 1 + machine-id: 1 + +ding-talk-alarm-robot-access-token: 1 + +logging: + config: classpath:logback.xml \ No newline at end of file diff --git a/dating-agency-mall-server/src/main/resources/logback.xml b/dating-agency-mall-server/src/main/resources/logback.xml new file mode 100644 index 0000000..05e344f --- /dev/null +++ b/dating-agency-mall-server/src/main/resources/logback.xml @@ -0,0 +1,66 @@ + + + + + ./logs/log.log + + INFO + + + ./logs/log.%d{yyyy-MM-dd}.log + 3 + + + [%d{yyyy-MM-dd HH:mm:ss:SSS}] %thread %level %logger{36} %L - %msg%n + UTF-8 + + + + + + ERROR + + + ./logs/error.%d{yyyy-MM-dd}.log + 3 + + + UTF-8 + [%d{yyyy-MM-dd HH:mm:ss.SSS}] [%thread] %-5level %logger{36} : %msg%n + + + + + [%d{yyyy-MM-dd HH:mm:ss:SSS}] %thread %level %logger{36} %L - %msg%n + UTF-8 + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..fd12178 --- /dev/null +++ b/pom.xml @@ -0,0 +1,64 @@ + + + 4.0.0 + + + com.qniao + java-dependency + 0.0.1-SNAPSHOT + + + dating-agency-mall + pom + + dating-agency-mall-server + dating-agency-mall-entity + dating-agency-mall-event + dating-agency-mall-constant + dating-agency-mal-sdk + + + + + 8 + 8 + UTF-8 + + + + + maven-releases + Nexus releases Repository + http://120.78.76.88:8081/repository/maven-releases/ + + + maven-snapshot + Nexus snapshot Repository + http://120.78.76.88:8081/repository/maven-snapshots/ + + + + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + + + nexus + qniao + http://120.78.76.88:8081/repository/maven-public/ + + true + always + + + + +