From 77dc6c8286073706283b059891358381dffef8a9 Mon Sep 17 00:00:00 2001 From: ForteScarlet Date: Fri, 6 Nov 2020 21:52:16 +0800 Subject: [PATCH] spring metadata --- .../spring-configuration-metadata.json | 75 +++++++++++++++++++ .../core/src/test/resources/simbot.properties | 1 + 2 files changed, 76 insertions(+) create mode 100644 core-parent/core/src/main/resources/META-INF/spring-configuration-metadata.json diff --git a/core-parent/core/src/main/resources/META-INF/spring-configuration-metadata.json b/core-parent/core/src/main/resources/META-INF/spring-configuration-metadata.json new file mode 100644 index 000000000..c66f4ab90 --- /dev/null +++ b/core-parent/core/src/main/resources/META-INF/spring-configuration-metadata.json @@ -0,0 +1,75 @@ +{ + "groups": [ + { + "name": "simbot", + "type": "love.forte.simbot.core.SimbotApp", + "sourceType": "love.forte.simbot.core.SimbotApp" + }, + { + "name": "simbot.core", + "type": "love.forte.simbot.core.configuration.CoreBotRegistrar", + "sourceType": "love.forte.simbot.core.configuration.CoreBotRegistrar" + }, + { + "name": "simbot.core.task.pool", + "type": "love.forte.simbot.core.configuration.ExecutorServiceProperties", + "sourceType": "love.forte.simbot.core.configuration.ExecutorServiceProperties" + } + ], + "properties": [ + { + "name": "simbot.core.bots", + "type": "java.util.List", + "description": "注册的bot列表信息。 其格式为 xxxx:yyyy,xxxx:yyyy 。 其中,xxxx一般代表为账号信息,yyyy一般代表为权限信息,例如密码,或者上报地址。", + "sourceType": "love.forte.simbot.spring.autoconfigure.properties.SimbotCoreConfigurationProperties" + }, + { + "name": "simbot.core.scan-package", + "type": "java.util.List", + "description": "可进行指定的包扫描路径。如果不指定则为启动器所在路径。", + "sourceType": "love.forte.simbot.spring.autoconfigure.properties.SimbotCoreConfigurationProperties" + }, + { + "name": "simbot.core.task.pool.core-pool-size", + "type": "java.lang.Integer", + "description": "核心池的大小", + "sourceType": "love.forte.simbot.spring.autoconfigure.properties.SimbotCoreTaskPoolConfigurationProperties", + "defaultValue": 1 + }, + { + "name": "simbot.core.task.pool.keep-alive-time", + "type": "java.lang.Long", + "description": "表示线程没有任务执行时最多保持多久时间会终止。 默认情况下,只有当线程池中的线程数大于corePoolSize时,keepAliveTime才会起作用, 直到线程池中的线程数不大于corePoolSize,即当线程池中的线程数大于corePoolSize时, 如果一个线程空闲的时间达到keepAliveTime,则会终止,直到线程池中的线程数不超过corePoolSize。 但是如果调用了allowCoreThreadTimeOut(boolean)方法,在线程池中的线程数不大于corePoolSize时,keepAliveTime参数也会起作用, 直到线程池中的线程数为0;", + "sourceType": "love.forte.simbot.spring.autoconfigure.properties.SimbotCoreTaskPoolConfigurationProperties", + "defaultValue": 0 + }, + { + "name": "simbot.core.task.pool.maximum-pool-size", + "type": "java.lang.Integer", + "description": "线程池最大线程数,这个参数也是一个非常重要的参数,它表示在线程池中最多能创建多少个线程;", + "sourceType": "love.forte.simbot.spring.autoconfigure.properties.SimbotCoreTaskPoolConfigurationProperties", + "defaultValue": 4 + }, + { + "name": "simbot.core.task.pool.time-unit", + "type": "java.util.concurrent.TimeUnit", + "description": "keep alive time的时间类型。", + "sourceType": "love.forte.simbot.spring.autoconfigure.properties.SimbotCoreTaskPoolConfigurationProperties" + }, + { + "name": "simbot.show-logo", + "type": "java.lang.Boolean", + "description": "展示simbot的logo。", + "sourceType": "love.forte.simbot.spring.autoconfigure.properties.SimbotNormalConfigurationProperties", + "defaultValue": true + }, + { + "name": "simbot.show-tips", + "type": "java.lang.Boolean", + "description": "展示simbot的随机tips。", + "sourceType": "love.forte.simbot.spring.autoconfigure.properties.SimbotNormalConfigurationProperties", + "defaultValue": true + } + ], + "hints": [] +} \ No newline at end of file diff --git a/core-parent/core/src/test/resources/simbot.properties b/core-parent/core/src/test/resources/simbot.properties index 139597f9c..b28b04f64 100644 --- a/core-parent/core/src/test/resources/simbot.properties +++ b/core-parent/core/src/test/resources/simbot.properties @@ -1,2 +1,3 @@ +