From 5e7bef0ac96920c25f3761c86911694687a48f0b Mon Sep 17 00:00:00 2001 From: TinyAnts Date: Sat, 2 Apr 2022 17:05:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9git=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- like-framework/like-admin/.gitignore | 1 - .../src/main/resources/application.yml | 58 +++++++++++++++++++ like-framework/like-front/.gitignore | 1 - .../src/main/resources/application.yml | 58 +++++++++++++++++++ 4 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 like-framework/like-admin/src/main/resources/application.yml create mode 100644 like-framework/like-front/src/main/resources/application.yml diff --git a/like-framework/like-admin/.gitignore b/like-framework/like-admin/.gitignore index c8c2403d..c3341405 100644 --- a/like-framework/like-admin/.gitignore +++ b/like-framework/like-admin/.gitignore @@ -2,7 +2,6 @@ /.vscode /target/ /like-admin.iml -/src/main/resources/application.yml /src/main/resources/application-pro.yml /src/main/resources/application-dev.yml /src/main/resources/application-test.yml \ No newline at end of file diff --git a/like-framework/like-admin/src/main/resources/application.yml b/like-framework/like-admin/src/main/resources/application.yml new file mode 100644 index 00000000..a5ff125c --- /dev/null +++ b/like-framework/like-admin/src/main/resources/application.yml @@ -0,0 +1,58 @@ +# 项目配置 +like: + upload-directory: D:\www\frame\ + +# 服务配置 +server: + port: 8082 + +# 框架配置 +spring: + profiles: + active: test + # 数据源配置 + datasource: + url: jdbc:mysql://localhost:3306/local_frame?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false + type: com.zaxxer.hikari.HikariDataSource # 数据源类型 + driver-class-name: com.mysql.jdbc.Driver # MySql的驱动 + username: root # 数据库账号 + password: root # 数据库密码 + hikari: + connection-timeout: 30000 # 等待连接分配连接的最大时长(毫秒),超出时长还没可用连接则发送SQLException,默认30秒 + minimum-idle: 5 # 最小连接数 + maximum-pool-size: 20 # 最大连接数 + auto-commit: true # 自动提交 + idle-timeout: 600000 # 连接超时的最大时长(毫秒),超时则被释放(retired),默认10分钟 + pool-name: DateSourceHikariCP # 连接池名称 + max-lifetime: 1800000 # 连接的生命时长(毫秒),超时而且没被使用则被释放,默认30分钟(1800000ms) + connection-init-sql: SELECT 1 # 连接时发起SQL测试脚本 + # 限制配置 + servlet: + multipart: + max-file-size: 100MB # 文件上传大小限制 + max-request-size: 100MB # 文件最大请求限制 + enabled: true + # Redis配置 + redis: + host: localhost # Redis服务地址 + port: 6379 # Redis端口 + password: # Redis密码 + database: 0 # 数据库索引 + timeout: 5000 # 连接超时 + lettuce: + pool: + max-wait: 30000 # 连接池最大阻塞等待时间(使用负数表示没有限制,默认-1) + max-active: 100 # 连接池最大连接数(使用负数表示没有限制,默认8) + max-idle: 20 # 连接池中的最大空闲连接(默认8) + min-idle: 0 # 连接池中的最小空闲连接(默认0) + +# Mybatis-plus配置 +mybatis-plus: + mapper-locations: classpath*:/mapper/**Mapper.xml # 映射文件路径 + typeAliasesPackage: com.hxkj.**.mapper +# configuration: +# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + global-config: + banner: false + db-config: + table-prefix: ls_ # 设置表前缀 \ No newline at end of file diff --git a/like-framework/like-front/.gitignore b/like-framework/like-front/.gitignore index a00ab681..a60fc315 100644 --- a/like-framework/like-front/.gitignore +++ b/like-framework/like-front/.gitignore @@ -2,7 +2,6 @@ /.vscode /target/ /like-front.iml -/src/main/resources/application.yml /src/main/resources/application-pro.yml /src/main/resources/application-dev.yml /src/main/resources/application-test.yml \ No newline at end of file diff --git a/like-framework/like-front/src/main/resources/application.yml b/like-framework/like-front/src/main/resources/application.yml new file mode 100644 index 00000000..232fd1ec --- /dev/null +++ b/like-framework/like-front/src/main/resources/application.yml @@ -0,0 +1,58 @@ +# 项目配置 +like: + upload-directory: D:\www\frame\ + +# 服务配置 +server: + port: 8083 + +# 框架配置 +spring: + profiles: + active: test + # 数据源配置 + datasource: + url: jdbc:mysql://localhost:3306/local_frame?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false + type: com.zaxxer.hikari.HikariDataSource # 数据源类型 + driver-class-name: com.mysql.jdbc.Driver # MySql的驱动 + username: root # 数据库账号 + password: root # 数据库密码 + hikari: + connection-timeout: 30000 # 等待连接分配连接的最大时长(毫秒),超出时长还没可用连接则发送SQLException,默认30秒 + minimum-idle: 5 # 最小连接数 + maximum-pool-size: 20 # 最大连接数 + auto-commit: true # 自动提交 + idle-timeout: 600000 # 连接超时的最大时长(毫秒),超时则被释放(retired),默认10分钟 + pool-name: DateSourceHikariCP # 连接池名称 + max-lifetime: 1800000 # 连接的生命时长(毫秒),超时而且没被使用则被释放,默认30分钟(1800000ms) + connection-init-sql: SELECT 1 # 连接时发起SQL测试脚本 + # 限制配置 + servlet: + multipart: + max-file-size: 100MB # 文件上传大小限制 + max-request-size: 100MB # 文件最大请求限制 + enabled: true + # Redis配置 + redis: + host: localhost # Redis服务地址 + port: 6379 # Redis端口 + password: # Redis密码 + database: 0 # 数据库索引 + timeout: 5000 # 连接超时 + lettuce: + pool: + max-wait: 30000 # 连接池最大阻塞等待时间(使用负数表示没有限制,默认-1) + max-active: 100 # 连接池最大连接数(使用负数表示没有限制,默认8) + max-idle: 20 # 连接池中的最大空闲连接(默认8) + min-idle: 0 # 连接池中的最小空闲连接(默认0) + +# Mybatis-plus配置 +mybatis-plus: + mapper-locations: classpath*:/mapper/**Mapper.xml # 映射文件路径 + typeAliasesPackage: com.hxkj.**.mapper +# configuration: +# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + global-config: + banner: false + db-config: + table-prefix: ls_ # 设置表前缀 \ No newline at end of file