增加配置jetlinks.protocol.spi

This commit is contained in:
zhou-hao 2020-05-14 14:10:15 +08:00
parent e288f565c0
commit f8309b4416
2 changed files with 4 additions and 1 deletions

View File

@ -224,6 +224,7 @@ public class JetLinksConfiguration {
}
@Bean(initMethod = "init")
@ConditionalOnProperty(prefix = "jetlinks.protocol.spi", name = "enabled", havingValue = "true")
public ServiceLoaderProtocolSupports serviceLoaderProtocolSupports(ServiceContext serviceContext) {
ServiceLoaderProtocolSupports supports = new ServiceLoaderProtocolSupports();
supports.setServiceContext(serviceContext);

View File

@ -91,7 +91,9 @@ jetlinks:
system:
context:
server: ${spring.application.name}
protocol:
spi:
enabled: true # 为true时开启自动加载通过依赖引入的协议包
logging:
level:
org.jetlinks: debug