[+] harmonys

This commit is contained in:
acgist
2023-03-19 20:37:08 +08:00
parent 36c5bc59e8
commit 7ca31097c5
62 changed files with 1838 additions and 540 deletions

View File

@@ -132,7 +132,7 @@ taoyao:
host: 0.0.0.0
port: 9999
encrypt: DES
encrypt-key:
encrypt-key: 2SPWy+TF1zM=
timeout: ${taoyao.timeout}
queue-size: 100000
min-thread: 4

View File

@@ -3,6 +3,7 @@ package com.acgist.taoyao.signal.configuration;
import java.util.Base64;
import java.util.Random;
import org.apache.commons.lang3.StringUtils;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
@@ -57,7 +58,7 @@ public class SocketSignalAutoConfiguration {
*/
private void buildSecret(SocketProperties socketProperties) {
log.info("Socket信令加密策略{}", socketProperties.getEncrypt());
if(socketProperties.getEncrypt() == null) {
if(socketProperties.getEncrypt() == null || StringUtils.isNotEmpty(socketProperties.getEncryptKey())) {
return;
}
final Random random = new Random();