This commit is contained in:
dzq 2025-05-08 14:58:49 +08:00
commit c94150a10a
47 changed files with 1004 additions and 0 deletions

6
agileboot-admin/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"marscode.codeCompletionPro": {
"enableCodeCompletionPro": false
},
"marscode.enableInlineCommand": true
}

View File

@ -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:\agilebootLinux配置 /home/agileboot
file-base-dir: /var/www/upload
# 前端url请求转发前缀
api-prefix: /dev-api
demo-enabled: false

View File

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

View File

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

BIN
agileboot-admin/lib.zip Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,4 @@
#!/bin/sh
sh ./stop.sh
sleep 2
sh ./start.sh

10
agileboot-admin/start.sh Normal file
View File

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

12
agileboot-admin/stop.sh Normal file
View File

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

7
agileboot-api/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"marscode.codeCompletionPro": {
"enableCodeCompletionPro": false
},
"marscode.enableInlineCommand": true,
"marscode.chatLanguage": "cn"
}

View File

@ -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:\agilebootLinux配置 /home/agileboot
file-base-dir: /data/project/wxshop/WebRoot/upload
# 前端url请求转发前缀
api-prefix: /dev-api
demo-enabled: false

BIN
agileboot-api/lib.zip Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

4
agileboot-api/restart.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
sh ./stop.sh
sleep 2
sh ./start.sh

10
agileboot-api/start.sh Normal file
View File

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

12
agileboot-api/stop.sh Normal file
View File

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

View File

@ -0,0 +1,6 @@
{
"marscode.chatLanguage": "cn",
"marscode.codeCompletionPro": {
"enableCodeCompletionPro": true
}
}

View File

@ -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:\agilebootLinux配置 /home/agileboot
file-base-dir: /data/project/wxshop/WebRoot/upload
# 前端url请求转发前缀
api-prefix: /dev-api
demo-enabled: false

View File

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

View File

@ -0,0 +1,6 @@
{
"marscode.codeCompletionPro": {
"enableCodeCompletionPro": false
},
"marscode.enableInlineCommand": true
}

View File

@ -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:\agilebootLinux配置 /home/agileboot
file-base-dir: /var/www/upload
# 前端url请求转发前缀
api-prefix: /dev-api
demo-enabled: false

View File

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

View File

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

Binary file not shown.

View File

@ -0,0 +1,4 @@
#!/bin/sh
sh ./stop.sh
sleep 2
sh ./start.sh

View File

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

View File

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

View File

@ -0,0 +1,7 @@
{
"marscode.codeCompletionPro": {
"enableCodeCompletionPro": false
},
"marscode.enableInlineCommand": true,
"marscode.chatLanguage": "cn"
}

View File

@ -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:\agilebootLinux配置 /home/agileboot
file-base-dir: /var/www/upload
# 前端url请求转发前缀
api-prefix: /dev-api
demo-enabled: false

View File

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

View File

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,4 @@
#!/bin/sh
sh ./stop.sh
sleep 2
sh ./start.sh

View File

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

View File

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