Commit 15fba0ecc919d833aca33d20c86a2c31381d6393

Authored by YunaiV
1 parent 4c09a559

【代码优化】YudaoWebSocketAutoConfiguration 去除多余的 matchIfMissing

yudao-framework/yudao-spring-boot-starter-websocket/src/main/java/cn/iocoder/yudao/framework/websocket/config/YudaoWebSocketAutoConfiguration.java
... ... @@ -85,7 +85,7 @@ public class YudaoWebSocketAutoConfiguration {
85 85 // ==================== Sender 相关 ====================
86 86  
87 87 @Configuration
88   - @ConditionalOnProperty(prefix = "yudao.websocket", name = "sender-type", havingValue = "local", matchIfMissing = true)
  88 + @ConditionalOnProperty(prefix = "yudao.websocket", name = "sender-type", havingValue = "local")
89 89 public class LocalWebSocketMessageSenderConfiguration {
90 90  
91 91 @Bean
... ... @@ -96,7 +96,7 @@ public class YudaoWebSocketAutoConfiguration {
96 96 }
97 97  
98 98 @Configuration
99   - @ConditionalOnProperty(prefix = "yudao.websocket", name = "sender-type", havingValue = "redis", matchIfMissing = true)
  99 + @ConditionalOnProperty(prefix = "yudao.websocket", name = "sender-type", havingValue = "redis")
100 100 public class RedisWebSocketMessageSenderConfiguration {
101 101  
102 102 @Bean
... ... @@ -114,7 +114,7 @@ public class YudaoWebSocketAutoConfiguration {
114 114 }
115 115  
116 116 @Configuration
117   - @ConditionalOnProperty(prefix = "yudao.websocket", name = "sender-type", havingValue = "rocketmq", matchIfMissing = true)
  117 + @ConditionalOnProperty(prefix = "yudao.websocket", name = "sender-type", havingValue = "rocketmq")
118 118 public class RocketMQWebSocketMessageSenderConfiguration {
119 119  
120 120 @Bean
... ... @@ -133,7 +133,7 @@ public class YudaoWebSocketAutoConfiguration {
133 133 }
134 134  
135 135 @Configuration
136   - @ConditionalOnProperty(prefix = "yudao.websocket", name = "sender-type", havingValue = "rabbitmq", matchIfMissing = true)
  136 + @ConditionalOnProperty(prefix = "yudao.websocket", name = "sender-type", havingValue = "rabbitmq")
137 137 public class RabbitMQWebSocketMessageSenderConfiguration {
138 138  
139 139 @Bean
... ... @@ -162,7 +162,7 @@ public class YudaoWebSocketAutoConfiguration {
162 162 }
163 163  
164 164 @Configuration
165   - @ConditionalOnProperty(prefix = "yudao.websocket", name = "sender-type", havingValue = "kafka", matchIfMissing = true)
  165 + @ConditionalOnProperty(prefix = "yudao.websocket", name = "sender-type", havingValue = "kafka")
166 166 public class KafkaWebSocketMessageSenderConfiguration {
167 167  
168 168 @Bean
... ...