Skip to content

Commit 0b8a202

Browse files
refactor: clean up unused imports and dead code
- Remove unused RpcClient import and field from RabbitMqConfig - Remove unused EthRpc import from RabbitMqConfig - Remove unused PostConstruct import from RabbitMqConfig - Simplify RabbitMqConfig to only contain bean definitions Co-authored-by: Galaxy <GalaxySciTech@users.noreply.github.com>
1 parent 9a3cdd7 commit 0b8a202

1 file changed

Lines changed: 3 additions & 24 deletions

File tree

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,21 @@
11
package com.wallet.task.config
22

33
import com.wallet.biz.dict.MqKey
4-
import com.wallet.biz.rpc.EthRpc
5-
import com.wallet.biz.rpc.RpcClient
64
import org.springframework.amqp.core.Binding
75
import org.springframework.amqp.core.BindingBuilder
86
import org.springframework.amqp.core.Queue
9-
import org.springframework.context.annotation.Configuration
10-
import org.springframework.context.annotation.Bean
117
import org.springframework.amqp.core.TopicExchange
12-
import org.springframework.beans.factory.annotation.Autowired
13-
import jakarta.annotation.PostConstruct
14-
8+
import org.springframework.context.annotation.Bean
9+
import org.springframework.context.annotation.Configuration
1510

16-
/**
17-
* Created by pie on 2019/2/22 16: 33.
18-
*/
1911
@Configuration
2012
open class RabbitMqConfig {
2113

22-
23-
24-
//声明队列
2514
@Bean
2615
open fun deposit(): Queue {
27-
return Queue(MqKey.DEPOSIT_QUEUE, true) // true表示持久化该队列
16+
return Queue(MqKey.DEPOSIT_QUEUE, true)
2817
}
2918

30-
//声明交互器
3119
@Bean
3220
open fun topicExchange(): TopicExchange {
3321
return TopicExchange(MqKey.TOPIC_EXCHANGE)
@@ -38,13 +26,4 @@ open class RabbitMqConfig {
3826
return BindingBuilder.bind(deposit()).to(topicExchange())
3927
.with(MqKey.DEPOSIT_KEY)
4028
}
41-
42-
// @Bean
43-
// open fun binding2(): Binding {
44-
// return BindingBuilder.bind(Queue("qq2")).to(TopicExchange(MqKey.TOPIC_EXCHANGE))
45-
// .with("foo.aa.#")
46-
// }
47-
48-
@Autowired
49-
lateinit var rpcClient: RpcClient
5029
}

0 commit comments

Comments
 (0)