summaryrefslogtreecommitdiff
path: root/src/main/resources/application-magic-api.yml
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/application-magic-api.yml')
-rw-r--r--src/main/resources/application-magic-api.yml77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/main/resources/application-magic-api.yml b/src/main/resources/application-magic-api.yml
new file mode 100644
index 0000000..64266ce
--- /dev/null
+++ b/src/main/resources/application-magic-api.yml
@@ -0,0 +1,77 @@
+magic-api:
+ web: /magic/web # UI请求的界面以及UI服务地址
+ resource: #配置存储方式
+ type: database # 配置存储在数据库中
+ tableName: magic_api_file # 数据库中的表名
+# datasource: magic #指定数据源(单数据源时无需配置,多数据源时默认使用主数据源,如果存在其他数据源中需要指定。)
+# prefix: /magic-api # key前缀
+ readonly: false # 是否是只读模式
+ prefix: / # 接口前缀,可以不配置
+ auto-import-module: db,http,log # 自动导入的模块
+ auto-import-package: java.lang.*,java.util.*,net.geedge.digitalhorizon.common.util.T #自动导包
+ allow-override: false #禁止覆盖应用接口
+ sql-column-case: camel #启用驼峰命名转换
+ editor-config: classpath:./static/magic-editor.js #编辑器配置
+ support-cross-domain: true # 跨域支持,默认开启
+# secret-key: 123456789 # 远程推送时的秘钥,未配置则不开启推送
+ push-path: /_magic-api-sync #远程推送的路径,默认为/_magic-api-sync
+ show-sql: true #配置打印SQL
+ compile-cache-size: 500 #配置编译缓存容量
+ persistence-response-body: true #是否持久化保存ResponseBody
+ date-pattern: # 配置请求参数支持的日期格式
+ - yyyy-MM-dd
+ - yyyy-MM-dd HH:mm:ss
+ - yyyyMMddHHmmss
+ - yyyyMMdd
+ response: |- #配置JSON格式,格式为magic-script中的表达式
+ {
+ code: code,
+ message: message,
+ data,
+ timestamp,
+ requestTime,
+ executeTime,
+ }
+ response-code:
+ success: 200 #执行成功的code值
+ invalid: 400 #参数验证未通过的code值
+ exception: 500 #执行出现异常的code值
+ banner: false # 打印banner
+ thread-pool-executor-size: 8 # async语句的线程池大小
+ throw-exception: false #执行出错时是否抛出异常
+ backup: #备份相关配置
+ enable: true #是否启用
+ max-history: -1 #备份保留天数,-1为永久保留
+# datasource: magic #指定数据源(单数据源时无需配置,多数据源时默认使用主数据源,如果存在其他数据源中需要指定。)
+ table-name: magic_api_backup #使用数据库存储备份时的表名
+ crud: # CRUD相关配置
+ logic-delete-column: deleted #逻辑删除列
+ logic-delete-value: 1 #逻辑删除值
+ cache: # 缓存相关配置
+ capacity: 10000 #缓存容量
+ ttl: -1 # 永不过期
+ enable: true # 启用缓存
+ page:
+ size: size # 页大小的参数名称
+ page: current # 页码的参数名称
+ default-page: 1 # 未传页码时的默认首页
+ default-size: 20 # 未传页大小时的默认页大小
+ security: # 安全配置
+ username: admin # 登录用的用户名
+ password: 123456 # 登录用的密码
+ swagger:
+ version: 1.0
+ description: Digital Horizon API 接口信息
+ title: DH API Swagger Docs
+ name: DH API 接口
+ location: /v2/api-docs/dh-api/swagger2.json
+ debug:
+ timeout: 60 # 断点超时时间,默认60s
+ task:
+ thread-name-prefix: dh-task- #线程池名字前缀
+ log: true # 打印日志
+ pool:
+ size: 8 #线程池大小,默认值为CPU核心数
+ shutdown:
+ awaitTermination: false #关闭时是否等待任务执行完毕,默认为false
+ awaitTerminationPeriod: 10s # 关闭时最多等待任务执行完毕的时间 \ No newline at end of file