commit c94150a10a7e9e3171df04bed7b83d7ee69e0435 Author: dzq Date: Thu May 8 14:58:49 2025 +0800 init diff --git a/agileboot-admin/.vscode/settings.json b/agileboot-admin/.vscode/settings.json new file mode 100644 index 0000000..ff10527 --- /dev/null +++ b/agileboot-admin/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "marscode.codeCompletionPro": { + "enableCodeCompletionPro": false + }, + "marscode.enableInlineCommand": true +} \ No newline at end of file diff --git a/agileboot-admin/config/application-dev.yml b/agileboot-admin/config/application-dev.yml new file mode 100644 index 0000000..8a10bd4 --- /dev/null +++ b/agileboot-admin/config/application-dev.yml @@ -0,0 +1,105 @@ +# 数据源配置 +spring: + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + druid: + webStatFilter: + enabled: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: agileboot + login-password: 123456 + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true + dynamic: + primary: master + strict: false + druid: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + datasource: + # 主库数据源 + master: + url: jdbc:mysql://localhost:3306/agileboot-pure?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: 4aa3d4061b435052 + # 从库数据源 +# slave: +# url: jdbc:mysql://localhost:33067/agileboot2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: root +# password: 12345 + + # redis 配置 + redis: + # 地址 + host: 127.0.0.1 + # 端口,默认为6379 + port: 6379 + # 数据库索引 + database: 0 + # 密码 +# password: 12345 + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + +logging: + file: + path: logs/ + + +springdoc: + swagger-ui: + # ***注意*** 开启Swagger UI界面 **安全考虑的话生产环境需要关掉** + # 因为knife4j的一些配置不灵活 所以重新改回springdoc+swagger的组合 真实开发的时候 使用apifox这种工具效率更高 + enabled: true + url: ${agileboot.api-prefix}/v3/api-docs + config-url: ${agileboot.api-prefix}/v3/api-docs/swagger-config + + +# 项目相关配置 +agileboot: + # 文件基路径 示例( Windows配置D:\agileboot,Linux配置 /home/agileboot) + file-base-dir: /var/www/upload + # 前端url请求转发前缀 + api-prefix: /dev-api + demo-enabled: false diff --git a/agileboot-admin/config/application-test.yml b/agileboot-admin/config/application-test.yml new file mode 100644 index 0000000..d9e7abe --- /dev/null +++ b/agileboot-admin/config/application-test.yml @@ -0,0 +1,53 @@ + +# 数据源配置 +spring: + datasource: + # 驱动 + driver-class-name: org.h2.Driver + dynamic: + primary: master + strict: false + datasource: + master: + # h2 内存数据库 内存模式连接配置 库名: agileboot + url: jdbc:h2:mem:agileboot;DB_CLOSE_DELAY=-1 + h2: + # 开启console 访问 默认false + console: + enabled: true + settings: + # 开启h2 console 跟踪 方便调试 默认 false + trace: true + # 允许console 远程访问 默认false + web-allow-others: true + # h2 访问路径上下文 + path: /h2-console + + sql: + init: + platform: mysql + # 初始化数据 + schema-locations: classpath:h2sql/agileboot_schema.sql + data-locations: classpath:h2sql/agileboot_data.sql + + # redis 配置 + redis: + # 地址 + host: localhost + # 端口,默认为6379 + port: 36379 + # 数据库索引 + database: 0 + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + diff --git a/agileboot-admin/config/application.yml b/agileboot-admin/config/application.yml new file mode 100644 index 0000000..faa92a9 --- /dev/null +++ b/agileboot-admin/config/application.yml @@ -0,0 +1,46 @@ +# 开发环境配置 +server: + # 服务器的HTTP端口,默认为8080 + port: 8090 + servlet: + # 应用的访问路径 + context-path: /shop-back-end + tomcat: + # tomcat的URI编码 + uri-encoding: UTF-8 + # 连接数满后的排队数,默认为100 + accept-count: 1000 + threads: + # tomcat最大线程数,默认为200 + max: 800 + # Tomcat启动初始化的线程数,默认值10 + min-spare: 100 + + +# Spring配置 如果需要无Mysql 无Redis直接启动的话 dev改为test +# 生产环境把dev改为prod +spring: + profiles: + active: basic,dev + +# 如果需要无Mysql 无Redis直接启动的话 可以将这两个参数置为true, 并且spring.profile.active: dev换成test +# redis的端口可能会被占用,如果被占用请自己修改一下端口号 +agileboot: + embedded: + mysql: false + redis: false + + + +springdoc: + api-docs: + enabled: true + groups: + enabled: true + group-configs: + - group: '公共API' + packages-to-scan: com.agileboot.admin.controller.common + - group: '内置系统API' + packages-to-scan: com.agileboot.admin.controller.system + + diff --git a/agileboot-admin/lib.zip b/agileboot-admin/lib.zip new file mode 100644 index 0000000..3509ad5 Binary files /dev/null and b/agileboot-admin/lib.zip differ diff --git a/agileboot-admin/lib/agileboot-admin.jar b/agileboot-admin/lib/agileboot-admin.jar new file mode 100644 index 0000000..1e7dfc0 Binary files /dev/null and b/agileboot-admin/lib/agileboot-admin.jar differ diff --git a/agileboot-admin/lib/agileboot-common-1.0.0.jar b/agileboot-admin/lib/agileboot-common-1.0.0.jar new file mode 100644 index 0000000..c8f3ec3 Binary files /dev/null and b/agileboot-admin/lib/agileboot-common-1.0.0.jar differ diff --git a/agileboot-admin/lib/agileboot-domain-1.0.0.jar b/agileboot-admin/lib/agileboot-domain-1.0.0.jar new file mode 100644 index 0000000..56fa6e4 Binary files /dev/null and b/agileboot-admin/lib/agileboot-domain-1.0.0.jar differ diff --git a/agileboot-admin/lib/agileboot-infrastructure-1.0.0.jar b/agileboot-admin/lib/agileboot-infrastructure-1.0.0.jar new file mode 100644 index 0000000..5d2b597 Binary files /dev/null and b/agileboot-admin/lib/agileboot-infrastructure-1.0.0.jar differ diff --git a/agileboot-admin/restart.sh b/agileboot-admin/restart.sh new file mode 100644 index 0000000..a419299 --- /dev/null +++ b/agileboot-admin/restart.sh @@ -0,0 +1,4 @@ +#!/bin/sh +sh ./stop.sh +sleep 2 +sh ./start.sh \ No newline at end of file diff --git a/agileboot-admin/start.sh b/agileboot-admin/start.sh new file mode 100644 index 0000000..7a7f970 --- /dev/null +++ b/agileboot-admin/start.sh @@ -0,0 +1,10 @@ +#!/bin/sh +AppName=agileboot-admin.jar +APP_HOME=$(cd $(dirname $0); pwd) +JAR_PATH=$APP_HOME/lib/$AppName +LIB_PATH=$APP_HOME/lib/* + +nohup java -Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m \ +-cp "$JAR_PATH:$LIB_PATH" com.agileboot.admin.AgileBootAdminApplication > /dev/null 2>&1 & + +echo "Application started" \ No newline at end of file diff --git a/agileboot-admin/stop.sh b/agileboot-admin/stop.sh new file mode 100644 index 0000000..a3ccde0 --- /dev/null +++ b/agileboot-admin/stop.sh @@ -0,0 +1,12 @@ +#!/bin/sh +AppName=agileboot-admin.jar +APP_HOME=$(cd $(dirname $0); pwd) +JAR_PATH=$APP_HOME/lib/$AppName + +PID=$(ps -ef | grep java | grep $JAR_PATH | grep -v grep | awk '{print $2}') +if [ -n "$PID" ]; then + kill -9 $PID + echo "Application stopped" +else + echo "Application is not running" +fi \ No newline at end of file diff --git a/agileboot-api/.vscode/settings.json b/agileboot-api/.vscode/settings.json new file mode 100644 index 0000000..d0e0bc8 --- /dev/null +++ b/agileboot-api/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "marscode.codeCompletionPro": { + "enableCodeCompletionPro": false + }, + "marscode.enableInlineCommand": true, + "marscode.chatLanguage": "cn" +} \ No newline at end of file diff --git a/agileboot-api/config/application-dev.yml b/agileboot-api/config/application-dev.yml new file mode 100644 index 0000000..e398d66 --- /dev/null +++ b/agileboot-api/config/application-dev.yml @@ -0,0 +1,105 @@ +# 数据源配置 +spring: + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + druid: + webStatFilter: + enabled: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: agileboot + login-password: 123456 + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true + dynamic: + primary: master + strict: false + druid: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + datasource: + # 主库数据源 + master: + url: jdbc:mysql://localhost:3364/wxshop?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true + username: wxshop + password: wXshoP.2025#shoP_YS + # 从库数据源 +# slave: +# url: jdbc:mysql://localhost:33067/agileboot2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: root +# password: 12345 + + # redis 配置 + redis: + # 地址 + host: 111.59.237.29 + # 端口,默认为6379 + port: 6399 + # 数据库索引 + database: 3 + # 密码 + password: RedIS#7.4$LinuX_cz1 + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + +logging: + file: + path: logs/ + + +springdoc: + swagger-ui: + # ***注意*** 开启Swagger UI界面 **安全考虑的话生产环境需要关掉** + # 因为knife4j的一些配置不灵活 所以重新改回springdoc+swagger的组合 真实开发的时候 使用apifox这种工具效率更高 + enabled: true + url: ${agileboot.api-prefix}/v3/api-docs + config-url: ${agileboot.api-prefix}/v3/api-docs/swagger-config + + +# 项目相关配置 +agileboot: + # 文件基路径 示例( Windows配置D:\agileboot,Linux配置 /home/agileboot) + file-base-dir: /data/project/wxshop/WebRoot/upload + # 前端url请求转发前缀 + api-prefix: /dev-api + demo-enabled: false diff --git a/agileboot-api/lib.zip b/agileboot-api/lib.zip new file mode 100644 index 0000000..25c488d Binary files /dev/null and b/agileboot-api/lib.zip differ diff --git a/agileboot-api/lib/agileboot-api.jar b/agileboot-api/lib/agileboot-api.jar new file mode 100644 index 0000000..2e3d8c5 Binary files /dev/null and b/agileboot-api/lib/agileboot-api.jar differ diff --git a/agileboot-api/lib/agileboot-common-1.0.0.jar b/agileboot-api/lib/agileboot-common-1.0.0.jar new file mode 100644 index 0000000..747003b Binary files /dev/null and b/agileboot-api/lib/agileboot-common-1.0.0.jar differ diff --git a/agileboot-api/lib/agileboot-domain-1.0.0.jar b/agileboot-api/lib/agileboot-domain-1.0.0.jar new file mode 100644 index 0000000..e604bb3 Binary files /dev/null and b/agileboot-api/lib/agileboot-domain-1.0.0.jar differ diff --git a/agileboot-api/lib/agileboot-infrastructure-1.0.0.jar b/agileboot-api/lib/agileboot-infrastructure-1.0.0.jar new file mode 100644 index 0000000..faf1270 Binary files /dev/null and b/agileboot-api/lib/agileboot-infrastructure-1.0.0.jar differ diff --git a/agileboot-api/restart.sh b/agileboot-api/restart.sh new file mode 100644 index 0000000..a419299 --- /dev/null +++ b/agileboot-api/restart.sh @@ -0,0 +1,4 @@ +#!/bin/sh +sh ./stop.sh +sleep 2 +sh ./start.sh \ No newline at end of file diff --git a/agileboot-api/start.sh b/agileboot-api/start.sh new file mode 100644 index 0000000..65e92cc --- /dev/null +++ b/agileboot-api/start.sh @@ -0,0 +1,10 @@ +#!/bin/sh +AppName=agileboot-api.jar +APP_HOME=$(cd $(dirname $0); pwd) +JAR_PATH=$APP_HOME/lib/$AppName +LIB_PATH=$APP_HOME/lib/* + +nohup java -Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m \ +-cp "$JAR_PATH:$LIB_PATH" com.agileboot.api.AgileBooApiApplication > /dev/null 2>&1 & + +echo "Application started" \ No newline at end of file diff --git a/agileboot-api/stop.sh b/agileboot-api/stop.sh new file mode 100644 index 0000000..0c321e4 --- /dev/null +++ b/agileboot-api/stop.sh @@ -0,0 +1,12 @@ +#!/bin/sh +AppName=agileboot-api.jar +APP_HOME=$(cd $(dirname $0); pwd) +JAR_PATH=$APP_HOME/lib/$AppName + +PID=$(ps -ef | grep java | grep $JAR_PATH | grep -v grep | awk '{print $2}') +if [ -n "$PID" ]; then + kill -9 $PID + echo "Application stopped" +else + echo "Application is not running" +fi \ No newline at end of file diff --git a/线上/agileboot-api/.vscode/settings.json b/线上/agileboot-api/.vscode/settings.json new file mode 100644 index 0000000..d955e5f --- /dev/null +++ b/线上/agileboot-api/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "marscode.chatLanguage": "cn", + "marscode.codeCompletionPro": { + "enableCodeCompletionPro": true + } +} \ No newline at end of file diff --git a/线上/agileboot-api/application-dev.yml b/线上/agileboot-api/application-dev.yml new file mode 100644 index 0000000..57a221f --- /dev/null +++ b/线上/agileboot-api/application-dev.yml @@ -0,0 +1,105 @@ +# 数据源配置 +spring: + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + druid: + webStatFilter: + enabled: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: agileboot + login-password: 123456 + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true + dynamic: + primary: master + strict: false + druid: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + datasource: + # 主库数据源 + master: + url: jdbc:mysql://localhost:3364/wxshop?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true + username: wxshop + password: wXshoP.2025#shoP_YS + # 从库数据源 +# slave: +# url: jdbc:mysql://localhost:33067/agileboot2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: root +# password: 12345 + + # redis 配置 + redis: + # 地址 + host: 119.45.157.223 + # 端口,默认为6379 + port: 6379 + # 数据库索引 + database: 3 + # 密码 +# password: 12345 + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + +logging: + file: + path: logs/ + + +springdoc: + swagger-ui: + # ***注意*** 开启Swagger UI界面 **安全考虑的话生产环境需要关掉** + # 因为knife4j的一些配置不灵活 所以重新改回springdoc+swagger的组合 真实开发的时候 使用apifox这种工具效率更高 + enabled: true + url: ${agileboot.api-prefix}/v3/api-docs + config-url: ${agileboot.api-prefix}/v3/api-docs/swagger-config + + +# 项目相关配置 +agileboot: + # 文件基路径 示例( Windows配置D:\agileboot,Linux配置 /home/agileboot) + file-base-dir: /data/project/wxshop/WebRoot/upload + # 前端url请求转发前缀 + api-prefix: /dev-api + demo-enabled: false diff --git a/线上/agileboot-api/application.yml b/线上/agileboot-api/application.yml new file mode 100644 index 0000000..d0eafaa --- /dev/null +++ b/线上/agileboot-api/application.yml @@ -0,0 +1,46 @@ +# 开发环境配置 +server: + # 服务器的HTTP端口,默认为8080 + port: 7014 + servlet: + # 应用的访问路径 + context-path: /shop-api + tomcat: + # tomcat的URI编码 + uri-encoding: UTF-8 + # 连接数满后的排队数,默认为100 + accept-count: 1000 + threads: + # tomcat最大线程数,默认为200 + max: 800 + # Tomcat启动初始化的线程数,默认值10 + min-spare: 100 + + +# Spring配置 如果需要无Mysql 无Redis直接启动的话 dev改为test +# 生产环境把dev改为prod +spring: + profiles: + active: basic,dev + +# 如果需要无Mysql 无Redis直接启动的话 可以将这两个参数置为true, 并且spring.profile.active: dev换成test +# redis的端口可能会被占用,如果被占用请自己修改一下端口号 +agileboot: + embedded: + mysql: false + redis: false + + + +springdoc: + api-docs: + enabled: true + groups: + enabled: true + group-configs: + - group: '公共API' + packages-to-scan: com.agileboot.admin.controller.common + - group: '内置系统API' + packages-to-scan: com.agileboot.admin.controller.system + + diff --git a/虚拟机/agileboot-admin/.vscode/settings.json b/虚拟机/agileboot-admin/.vscode/settings.json new file mode 100644 index 0000000..ff10527 --- /dev/null +++ b/虚拟机/agileboot-admin/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "marscode.codeCompletionPro": { + "enableCodeCompletionPro": false + }, + "marscode.enableInlineCommand": true +} \ No newline at end of file diff --git a/虚拟机/agileboot-admin/config/application-dev.yml b/虚拟机/agileboot-admin/config/application-dev.yml new file mode 100644 index 0000000..8a10bd4 --- /dev/null +++ b/虚拟机/agileboot-admin/config/application-dev.yml @@ -0,0 +1,105 @@ +# 数据源配置 +spring: + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + druid: + webStatFilter: + enabled: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: agileboot + login-password: 123456 + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true + dynamic: + primary: master + strict: false + druid: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + datasource: + # 主库数据源 + master: + url: jdbc:mysql://localhost:3306/agileboot-pure?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: 4aa3d4061b435052 + # 从库数据源 +# slave: +# url: jdbc:mysql://localhost:33067/agileboot2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: root +# password: 12345 + + # redis 配置 + redis: + # 地址 + host: 127.0.0.1 + # 端口,默认为6379 + port: 6379 + # 数据库索引 + database: 0 + # 密码 +# password: 12345 + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + +logging: + file: + path: logs/ + + +springdoc: + swagger-ui: + # ***注意*** 开启Swagger UI界面 **安全考虑的话生产环境需要关掉** + # 因为knife4j的一些配置不灵活 所以重新改回springdoc+swagger的组合 真实开发的时候 使用apifox这种工具效率更高 + enabled: true + url: ${agileboot.api-prefix}/v3/api-docs + config-url: ${agileboot.api-prefix}/v3/api-docs/swagger-config + + +# 项目相关配置 +agileboot: + # 文件基路径 示例( Windows配置D:\agileboot,Linux配置 /home/agileboot) + file-base-dir: /var/www/upload + # 前端url请求转发前缀 + api-prefix: /dev-api + demo-enabled: false diff --git a/虚拟机/agileboot-admin/config/application-test.yml b/虚拟机/agileboot-admin/config/application-test.yml new file mode 100644 index 0000000..d9e7abe --- /dev/null +++ b/虚拟机/agileboot-admin/config/application-test.yml @@ -0,0 +1,53 @@ + +# 数据源配置 +spring: + datasource: + # 驱动 + driver-class-name: org.h2.Driver + dynamic: + primary: master + strict: false + datasource: + master: + # h2 内存数据库 内存模式连接配置 库名: agileboot + url: jdbc:h2:mem:agileboot;DB_CLOSE_DELAY=-1 + h2: + # 开启console 访问 默认false + console: + enabled: true + settings: + # 开启h2 console 跟踪 方便调试 默认 false + trace: true + # 允许console 远程访问 默认false + web-allow-others: true + # h2 访问路径上下文 + path: /h2-console + + sql: + init: + platform: mysql + # 初始化数据 + schema-locations: classpath:h2sql/agileboot_schema.sql + data-locations: classpath:h2sql/agileboot_data.sql + + # redis 配置 + redis: + # 地址 + host: localhost + # 端口,默认为6379 + port: 36379 + # 数据库索引 + database: 0 + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + diff --git a/虚拟机/agileboot-admin/config/application.yml b/虚拟机/agileboot-admin/config/application.yml new file mode 100644 index 0000000..faa92a9 --- /dev/null +++ b/虚拟机/agileboot-admin/config/application.yml @@ -0,0 +1,46 @@ +# 开发环境配置 +server: + # 服务器的HTTP端口,默认为8080 + port: 8090 + servlet: + # 应用的访问路径 + context-path: /shop-back-end + tomcat: + # tomcat的URI编码 + uri-encoding: UTF-8 + # 连接数满后的排队数,默认为100 + accept-count: 1000 + threads: + # tomcat最大线程数,默认为200 + max: 800 + # Tomcat启动初始化的线程数,默认值10 + min-spare: 100 + + +# Spring配置 如果需要无Mysql 无Redis直接启动的话 dev改为test +# 生产环境把dev改为prod +spring: + profiles: + active: basic,dev + +# 如果需要无Mysql 无Redis直接启动的话 可以将这两个参数置为true, 并且spring.profile.active: dev换成test +# redis的端口可能会被占用,如果被占用请自己修改一下端口号 +agileboot: + embedded: + mysql: false + redis: false + + + +springdoc: + api-docs: + enabled: true + groups: + enabled: true + group-configs: + - group: '公共API' + packages-to-scan: com.agileboot.admin.controller.common + - group: '内置系统API' + packages-to-scan: com.agileboot.admin.controller.system + + diff --git a/虚拟机/agileboot-admin/lib/agileboot-admin.jar b/虚拟机/agileboot-admin/lib/agileboot-admin.jar new file mode 100644 index 0000000..b852986 Binary files /dev/null and b/虚拟机/agileboot-admin/lib/agileboot-admin.jar differ diff --git a/虚拟机/agileboot-admin/lib/agileboot-common-1.0.0.jar b/虚拟机/agileboot-admin/lib/agileboot-common-1.0.0.jar new file mode 100644 index 0000000..a881f20 Binary files /dev/null and b/虚拟机/agileboot-admin/lib/agileboot-common-1.0.0.jar differ diff --git a/虚拟机/agileboot-admin/lib/agileboot-domain-1.0.0.jar b/虚拟机/agileboot-admin/lib/agileboot-domain-1.0.0.jar new file mode 100644 index 0000000..99bc128 Binary files /dev/null and b/虚拟机/agileboot-admin/lib/agileboot-domain-1.0.0.jar differ diff --git a/虚拟机/agileboot-admin/lib/agileboot-infrastructure-1.0.0.jar b/虚拟机/agileboot-admin/lib/agileboot-infrastructure-1.0.0.jar new file mode 100644 index 0000000..aa0d74d Binary files /dev/null and b/虚拟机/agileboot-admin/lib/agileboot-infrastructure-1.0.0.jar differ diff --git a/虚拟机/agileboot-admin/restart.sh b/虚拟机/agileboot-admin/restart.sh new file mode 100644 index 0000000..a419299 --- /dev/null +++ b/虚拟机/agileboot-admin/restart.sh @@ -0,0 +1,4 @@ +#!/bin/sh +sh ./stop.sh +sleep 2 +sh ./start.sh \ No newline at end of file diff --git a/虚拟机/agileboot-admin/start.sh b/虚拟机/agileboot-admin/start.sh new file mode 100644 index 0000000..7a7f970 --- /dev/null +++ b/虚拟机/agileboot-admin/start.sh @@ -0,0 +1,10 @@ +#!/bin/sh +AppName=agileboot-admin.jar +APP_HOME=$(cd $(dirname $0); pwd) +JAR_PATH=$APP_HOME/lib/$AppName +LIB_PATH=$APP_HOME/lib/* + +nohup java -Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m \ +-cp "$JAR_PATH:$LIB_PATH" com.agileboot.admin.AgileBootAdminApplication > /dev/null 2>&1 & + +echo "Application started" \ No newline at end of file diff --git a/虚拟机/agileboot-admin/stop.sh b/虚拟机/agileboot-admin/stop.sh new file mode 100644 index 0000000..a3ccde0 --- /dev/null +++ b/虚拟机/agileboot-admin/stop.sh @@ -0,0 +1,12 @@ +#!/bin/sh +AppName=agileboot-admin.jar +APP_HOME=$(cd $(dirname $0); pwd) +JAR_PATH=$APP_HOME/lib/$AppName + +PID=$(ps -ef | grep java | grep $JAR_PATH | grep -v grep | awk '{print $2}') +if [ -n "$PID" ]; then + kill -9 $PID + echo "Application stopped" +else + echo "Application is not running" +fi \ No newline at end of file diff --git a/虚拟机/agileboot-api/.vscode/settings.json b/虚拟机/agileboot-api/.vscode/settings.json new file mode 100644 index 0000000..d0e0bc8 --- /dev/null +++ b/虚拟机/agileboot-api/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "marscode.codeCompletionPro": { + "enableCodeCompletionPro": false + }, + "marscode.enableInlineCommand": true, + "marscode.chatLanguage": "cn" +} \ No newline at end of file diff --git a/虚拟机/agileboot-api/config/application-dev.yml b/虚拟机/agileboot-api/config/application-dev.yml new file mode 100644 index 0000000..8a10bd4 --- /dev/null +++ b/虚拟机/agileboot-api/config/application-dev.yml @@ -0,0 +1,105 @@ +# 数据源配置 +spring: + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + druid: + webStatFilter: + enabled: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: agileboot + login-password: 123456 + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true + dynamic: + primary: master + strict: false + druid: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + datasource: + # 主库数据源 + master: + url: jdbc:mysql://localhost:3306/agileboot-pure?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: 4aa3d4061b435052 + # 从库数据源 +# slave: +# url: jdbc:mysql://localhost:33067/agileboot2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: root +# password: 12345 + + # redis 配置 + redis: + # 地址 + host: 127.0.0.1 + # 端口,默认为6379 + port: 6379 + # 数据库索引 + database: 0 + # 密码 +# password: 12345 + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + +logging: + file: + path: logs/ + + +springdoc: + swagger-ui: + # ***注意*** 开启Swagger UI界面 **安全考虑的话生产环境需要关掉** + # 因为knife4j的一些配置不灵活 所以重新改回springdoc+swagger的组合 真实开发的时候 使用apifox这种工具效率更高 + enabled: true + url: ${agileboot.api-prefix}/v3/api-docs + config-url: ${agileboot.api-prefix}/v3/api-docs/swagger-config + + +# 项目相关配置 +agileboot: + # 文件基路径 示例( Windows配置D:\agileboot,Linux配置 /home/agileboot) + file-base-dir: /var/www/upload + # 前端url请求转发前缀 + api-prefix: /dev-api + demo-enabled: false diff --git a/虚拟机/agileboot-api/config/application-test.yml b/虚拟机/agileboot-api/config/application-test.yml new file mode 100644 index 0000000..d9e7abe --- /dev/null +++ b/虚拟机/agileboot-api/config/application-test.yml @@ -0,0 +1,53 @@ + +# 数据源配置 +spring: + datasource: + # 驱动 + driver-class-name: org.h2.Driver + dynamic: + primary: master + strict: false + datasource: + master: + # h2 内存数据库 内存模式连接配置 库名: agileboot + url: jdbc:h2:mem:agileboot;DB_CLOSE_DELAY=-1 + h2: + # 开启console 访问 默认false + console: + enabled: true + settings: + # 开启h2 console 跟踪 方便调试 默认 false + trace: true + # 允许console 远程访问 默认false + web-allow-others: true + # h2 访问路径上下文 + path: /h2-console + + sql: + init: + platform: mysql + # 初始化数据 + schema-locations: classpath:h2sql/agileboot_schema.sql + data-locations: classpath:h2sql/agileboot_data.sql + + # redis 配置 + redis: + # 地址 + host: localhost + # 端口,默认为6379 + port: 36379 + # 数据库索引 + database: 0 + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + diff --git a/虚拟机/agileboot-api/config/application.yml b/虚拟机/agileboot-api/config/application.yml new file mode 100644 index 0000000..4e9b981 --- /dev/null +++ b/虚拟机/agileboot-api/config/application.yml @@ -0,0 +1,46 @@ +# 开发环境配置 +server: + # 服务器的HTTP端口,默认为8080 + port: 8091 + servlet: + # 应用的访问路径 + context-path: /shop-api + tomcat: + # tomcat的URI编码 + uri-encoding: UTF-8 + # 连接数满后的排队数,默认为100 + accept-count: 1000 + threads: + # tomcat最大线程数,默认为200 + max: 800 + # Tomcat启动初始化的线程数,默认值10 + min-spare: 100 + + +# Spring配置 如果需要无Mysql 无Redis直接启动的话 dev改为test +# 生产环境把dev改为prod +spring: + profiles: + active: basic,dev + +# 如果需要无Mysql 无Redis直接启动的话 可以将这两个参数置为true, 并且spring.profile.active: dev换成test +# redis的端口可能会被占用,如果被占用请自己修改一下端口号 +agileboot: + embedded: + mysql: false + redis: false + + + +springdoc: + api-docs: + enabled: true + groups: + enabled: true + group-configs: + - group: '公共API' + packages-to-scan: com.agileboot.admin.controller.common + - group: '内置系统API' + packages-to-scan: com.agileboot.admin.controller.system + + diff --git a/虚拟机/agileboot-api/lib/agileboot-api.jar b/虚拟机/agileboot-api/lib/agileboot-api.jar new file mode 100644 index 0000000..9cb5065 Binary files /dev/null and b/虚拟机/agileboot-api/lib/agileboot-api.jar differ diff --git a/虚拟机/agileboot-api/lib/agileboot-common-1.0.0.jar b/虚拟机/agileboot-api/lib/agileboot-common-1.0.0.jar new file mode 100644 index 0000000..284dc99 Binary files /dev/null and b/虚拟机/agileboot-api/lib/agileboot-common-1.0.0.jar differ diff --git a/虚拟机/agileboot-api/lib/agileboot-domain-1.0.0.jar b/虚拟机/agileboot-api/lib/agileboot-domain-1.0.0.jar new file mode 100644 index 0000000..8f35947 Binary files /dev/null and b/虚拟机/agileboot-api/lib/agileboot-domain-1.0.0.jar differ diff --git a/虚拟机/agileboot-api/lib/agileboot-infrastructure-1.0.0.jar b/虚拟机/agileboot-api/lib/agileboot-infrastructure-1.0.0.jar new file mode 100644 index 0000000..93cadd6 Binary files /dev/null and b/虚拟机/agileboot-api/lib/agileboot-infrastructure-1.0.0.jar differ diff --git a/虚拟机/agileboot-api/restart.sh b/虚拟机/agileboot-api/restart.sh new file mode 100644 index 0000000..a419299 --- /dev/null +++ b/虚拟机/agileboot-api/restart.sh @@ -0,0 +1,4 @@ +#!/bin/sh +sh ./stop.sh +sleep 2 +sh ./start.sh \ No newline at end of file diff --git a/虚拟机/agileboot-api/start.sh b/虚拟机/agileboot-api/start.sh new file mode 100644 index 0000000..65e92cc --- /dev/null +++ b/虚拟机/agileboot-api/start.sh @@ -0,0 +1,10 @@ +#!/bin/sh +AppName=agileboot-api.jar +APP_HOME=$(cd $(dirname $0); pwd) +JAR_PATH=$APP_HOME/lib/$AppName +LIB_PATH=$APP_HOME/lib/* + +nohup java -Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m \ +-cp "$JAR_PATH:$LIB_PATH" com.agileboot.api.AgileBooApiApplication > /dev/null 2>&1 & + +echo "Application started" \ No newline at end of file diff --git a/虚拟机/agileboot-api/stop.sh b/虚拟机/agileboot-api/stop.sh new file mode 100644 index 0000000..0c321e4 --- /dev/null +++ b/虚拟机/agileboot-api/stop.sh @@ -0,0 +1,12 @@ +#!/bin/sh +AppName=agileboot-api.jar +APP_HOME=$(cd $(dirname $0); pwd) +JAR_PATH=$APP_HOME/lib/$AppName + +PID=$(ps -ef | grep java | grep $JAR_PATH | grep -v grep | awk '{print $2}') +if [ -n "$PID" ]; then + kill -9 $PID + echo "Application stopped" +else + echo "Application is not running" +fi \ No newline at end of file